Live threats

All CVEs / Koxudaxi

CVE-2026-54653Koxudaxi Datamodel-code-generator

High 8.8 No auth needed

Priority
68
CVSS 3.1
8.8
EPSS
—
Auth required
No
Published
Jul 28, 2026
Updated
Oct 23, 2026
Category
Application · Cross-platform
Weakness (CWE)
CWE-94, CWE-1336
SSVC (CISA)
Exploitation: none · Automatable: no · Technical impact: total
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

What happens

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.

Original NVD text.

What to do

  1. Apply the vendor's security update for Datamodel-code-generator.
  2. It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.

Affected packages

EcosystemPackageAffected versionsFixed inHow to upgrade
PyPI datamodel-code-generator ≥ 0.17.0 < 0.60.2 0.60.2 pip install "datamodel-code-generator>=0.60.2"
PyPI datamodel-code-generator ≥ 0.17.0 < 0.60.2 0.60.2 pip install "datamodel-code-generator>=0.60.2"

Per OSV / GitHub Advisories (GHSA-386q-5hp3-95m9, PYSEC-2026-3555). Check the version in your lockfile before upgrading.

Affected products (CPE)

VendorProductVersions
koxudaxidatamodel-code-generator≥ 0.17.0 < 0.60.2

Official sources

References

Links published by the sources. Open them with care.