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
This high-severity CVE scores 8.8 under a secondary CVSS source (NVD's own analysis pending). EPSS exploit probability: 0.3%, top 74% of all CVEs by exploit prediction. GitHub Security Advisory data not yet ingested — confidence will rise once GHSA publishes (typical lag: hours to days for open-source ecosystem CVEs; never for infrastructure-only CVEs).
- High severity, but no confirmed exploitation yet
No vendor fix yet — apply a workaround or compensating control (WAF / firewall / segmentation) and watch for a patch.
- CVSS v3
- 8.8
- EG Score
- 8.8(medium)
- EG Risk
- 40(Track)EG Risk 40/100SSVC: Track
EG Risk is EchelonGraph's 0–100 priority score: it fuses intrinsic severity with real-world exploitation and automatability so you can rank equal-severity CVEs and fix the most dangerous first. Higher = act sooner. Distinct from the 0–10 EG Score (severity).
How it’s computedSeverity88% × 45%Exploitation0% × 40%Automatability0% × 15%Action: Routine — remediate on your standard cadence. - EPSS PROB
- 0%
- EPSS %ILE
- 26%
- KEV
- Not listed
Published
July 28, 2026
Last Modified
July 29, 2026
Advisory Details (3)
Auto-updated Jul 28, 20260.60.2
Patch available: koxudaxi/datamodel-code-generator 0.60.2
https://github.com/koxudaxi/datamodel-code-generator/releases/tag/0.60.2commit 17fc235e234c (koxudaxi/datamodel-code-generator)
Patch available: koxudaxi/datamodel-code-generator 0.60.2 (contains commit 17fc235e234c)
https://github.com/koxudaxi/datamodel-code-generator/commit/17fc235e234cbcfaaadef8c74cb72c9687db0d1dCode injection in `datamodel-code-generator` via attacker-controlled `default_factory` schema field · Advisory · koxudaxi/datamodel-code-generator · GitHub
https://github.com/koxudaxi/datamodel-code-generator/security/advisories/GHSA-386q-5hp3-95m9Vendor Advisories for CVE-2026-54653(1)
These vendors published their own advisory mentioning this CVE — often with vendor-specific remediation steps + affected product lists not in NVD.
Affected Packages
(1 across 1 ecosystem)
PyPI(1)
| Package | Vulnerable range | Fixed in | Dependents |
|---|---|---|---|
| datamodel-code-generator | 0.17.0 ... 0.60.1 (90 versions) | 0.60.2 | — |
Weakness Classification(2)
MITRE Common Weakness Enumeration — the root-cause categories this CVE belongs to.
Data Freshness Timeline
(refreshed 7× in last 7d / 7× in last 30d)
Each row is a source pipeline that fetched or updated this CVE on that date, with what changed. For example, "NVD update" means NVD published or revised its analysis for this CVE; "MITRE cvelistV5" means we ingested or refreshed it from the CNA feed. Most recent first.
- 2026-07-30 02:53 UTCEG score recompute
- 2026-07-30 01:30 UTCEPSS rescore
- 2026-07-29 14:20 UTCEG score recompute
- 2026-07-29 13:58 UTCEG score recompute
- 2026-07-28 22:26 UTCEG score recompute
- 2026-07-28 21:54 UTCEG score recompute
- 2026-07-28 21:52 UTCMITRE cvelistV5first tracked
Related CVEs(same CWE)
Same CWE
10 shownCWE-94
- CVE-2003-1432EG 10.0EPSS p94HIGH
- CVE-2002-0495EG 10.0EPSS p96HIGH
- CVE-1999-0702EG 10.0EPSS p98HIGH
- CVE-1999-0509EG 10.0EPSS p98HIGH
- CVE-2006-1318EG 9.3EPSS p96HIGH
- CVE-2006-1301EG 9.3EPSS p95HIGH
- CVE-2006-1308EG 9.3EPSS p95HIGH
- CVE-2006-1309EG 9.3EPSS p95HIGH
- CVE-2006-1304EG 9.3EPSS p95HIGH
- CVE-2006-1306EG 9.3EPSS p95HIGH
Frequently asked(5)
What is CVE-2026-54653?
When was CVE-2026-54653 disclosed?
Is CVE-2026-54653 actively exploited?
What is the CVSS score of CVE-2026-54653?
How do I remediate CVE-2026-54653?
Dependency Blast Radius
See which npm, PyPI, Go, and Maven packages are affected by CVE-2026-54653
Is Your Infrastructure Affected by CVE-2026-54653?
EchelonGraph automatically scans your cloud infrastructure and maps CVE exposure using blast radius analysis.