SCA: security update for datamodel-code-generator (GHSA-wjv6-jcfj-mf9r)

high Tenable Self-Hosted Container Security Plugin ID 445422

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.14.1 until 0.60.2,
the --extra-template-data comment field is rendered into Python comments in
src/datamodel_code_generator/model/template/TypeAliasAnnotation.jinja2,
src/datamodel_code_generator/model/template/TypedDict.jinja2,
src/datamodel_code_generator/model/template/dataclass.jinja2,
src/datamodel_code_generator/model/template/msgspec.Struct.jinja2,
src/datamodel_code_generator/model/template/pydantic/BaseModel.jinja2, and
src/datamodel_code_generator/model/template/pydantic_v2/BaseModel.jinja2 without neutralizing carriage
returns in Python # comments, allowing an attacker-controlled comment value to inject Python code into
generated models that runs when imported. This issue is fixed in version 0.60.2. (CVE-2026-54654)

Solution

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

See Also

https://github.com/advisories/GHSA-wjv6-jcfj-mf9r

Plugin Details

Severity: High

ID: 445422

Version: Revision 1.1

Type: Local

Family: SCA Checks

Published: 7/29/2026

Updated: 7/29/2026

Risk Information

Vendor

Vendor Severity: High

CVSS v2

Risk Factor: High

Base Score: 7.2

Temporal Score: 5.3

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

CVSS Score Source: CVE-2026-54654

CVSS v3

Risk Factor: High

Base Score: 7.8

Temporal Score: 6.8

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

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

Vulnerability Information

Exploit Ease: No known exploits are available

Patch Publication Date: 7/28/2026

Vulnerability Publication Date: 7/28/2026

Reference Information

CVE: CVE-2026-54654