SCA: security update for datamodel-code-generator (GHSA-386q-5hp3-95m9)

high Tenable Self-Hosted Container Security Plugin ID 445427

Description

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

- datamodel-code-generator generates Pydantic v2 models, dataclasses, TypedDict, and msgspec.Struct from
OpenAPI, JSON Schema, GraphQL, Avro, Protobuf, and raw JSON, YAML, or CSV. From 0.17.0 until 0.60.2,
datamodel-code-generator preserves attacker-controlled default_factory values in
src/datamodel_code_generator/parser/jsonschema.py through JsonSchemaObject.init and get_field_extras and
emits them into Field(default_factory=...) or field(default_factory=...), allowing Python expression
execution when the generated model is imported. This issue is fixed in version 0.60.2. (CVE-2026-54653)

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-386q-5hp3-95m9

Plugin Details

Severity: High

ID: 445427

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: Critical

Base Score: 10

Temporal Score: 7.4

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

CVSS Score Source: CVE-2026-54653

CVSS v3

Risk Factor: High

Base Score: 8.8

Temporal Score: 7.7

Vector: CVSS:3.0/AV:N/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-54653