SCA: security update for datamodel-code-generator (GHSA-77xj-x4rm-935c)

high Tenable Cloud Security Plugin ID 473877

Description

There are packages installed that are affected by a vulnerability referenced in the following CVE:

- datamodel-code-generator generates Python data models from schema definitions. From 0.59.0 until 0.81.0,
an attacker-controlled Protobuf schema can supply absolute or parent-directory paths captured by
WEAK_IMPORT_PATTERN and consumed by _write_missing_weak_imports in
src/datamodel_code_generator/parser/protobuf.py. Exploitation requires a victim or automated job to
process the attacker-controlled schema with Protobuf input support, which requires the grpcio-tools
package. The paths escape the weak_imports temporary directory before protoc runs, allowing creation of
directory trees and new files or overwrite of existing writable files with a generated Protobuf syntax
declaration. The effect persists when later Protobuf compilation fails. The written content is limited to
a proto2 or proto3 syntax declaration, and direct arbitrary code execution has not been demonstrated. This
issue is fixed in version 0.81.0. (CVE-2026-107377)

Solution

Update the datamodel-code-generator library and its related packages to version 0.81.0 or later.

See Also

https://github.com/advisories/GHSA-77xj-x4rm-935c

Plugin Details

Severity: High

ID: 473877

Version: Revision 1.2

Type: Local

Family: SCA Checks

Published: 10/8/2026

Updated: 10/9/2026

Risk Information

VPR

Risk Factor: Low

Score: 3

Percentile: 23.67

Vendor

Vendor Severity: High

CVSS v2

Risk Factor: High

Base Score: 7.8

Temporal Score: 5.8

Vector: CVSS2#AV:N/AC:L/Au:N/C:N/I:C/A:N

CVSS Score Source: CVE-2026-107377

CVSS v3

Risk Factor: High

Base Score: 7.5

Temporal Score: 6.5

Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N

Temporal Vector: CVSS:3.0/E:U/RL:O/RC:C

Vulnerability Information

Exploit Ease: No known exploits are available

Patch Publication Date: 10/8/2026

Vulnerability Publication Date: 10/8/2026

Reference Information

CVE: CVE-2026-107377