CVE-2026-54653
Koxudaxi Datamodel-code-generator code injection
- Published28 Jul 2026
Description
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.
CVSS 3.1 breakdown
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:HAffected products
Remediation
References
- https://gist.github.com/thegr1ffyn/9648b0fe4fcf7d569ac8e61dd11eebaf
- https://github.com/koxudaxi/datamodel-code-generator/commit/17fc235e234cbcfaaadef8c74cb72c9687db0d1d
- https://github.com/koxudaxi/datamodel-code-generator/releases/tag/0.60.2
- https://github.com/koxudaxi/datamodel-code-generator/security/advisories/GHSA-386q-5hp3-95m9
Related CVEs
Recent high-severity vulnerabilities sharing a weakness type.
Frequently asked
Is CVE-2026-54653 being actively exploited?
CVE-2026-54653 is not in the CISA KEV catalog. A public exploit reference exists, so treat it as exploitable. Its EPSS exploit probability is 0.71%.
How severe is CVE-2026-54653?
CVE-2026-54653 has a CVSS 3.1 base score of 8.8, rated high. EPSS estimates a 0.71% probability of exploitation.
Which products are affected by CVE-2026-54653?
Affected products include Koxudaxi Datamodel-code-generator.
How do I fix CVE-2026-54653?
Upgrade affected software to a fixed version, for example Koxudaxi Datamodel-code-generator 0.60.2 or later, then confirm no affected versions remain in your inventory.
How Secuno handles this
Secuno correlates vulnerabilities like CVE-2026-54653 against the real software inventory on every managed device, every day. Rather than a static severity, each match is scored in context: exploit availability, EPSS, the asset's exposure, and business criticality decide where it lands in the queue. If an affected version is present anywhere across your portfolio, it surfaces automatically with a prioritised remediation path.
Data from the NVD, CISA KEV catalog and FIRST EPSS. CVSS 3.1 base score shown where available.