CVE Explorer
CVE-2026-54655
datamodel-code-generator generates Python data models from schema definitions. From 0.51.0 until 0.60.2, x-python-type values parsed by src/datamodel_code_generator/parser/jsonschema.py in _get_python_type_override are inserted into generated field annotations without sufficient validation, allowing attacker-controlled JSON Schema content to execute Python code when the generated module is imported. This issue is fixed in version 0.60.2.
Known exploited
Not asserted
Disputed
No
Stale source
No
Conflicts
0
Affected products and versions
1 source assertion{"product":"datamodel-code-generator","vendor":"koxudaxi","versions":[{"status":"affected","version":">= 0.51.0, < 0.60.2"}]}
- cve_program_cvelist_v5affectedurn:baitaphish:normalized-source-record:v2:874655d40c465b928ebe8115f739b2f94abeed3aeeb54c6135ae6f47f891ce13 · sha256:96f916576d57d311… · /containers/cna/affected/0
Provider-owned CVSS observations
1 source assertion{"metric":{"attackComplexity":"LOW","attackVector":"LOCAL","availabilityImpact":"HIGH","baseScore":7.8,"baseSeverity":"HIGH","confidentialityImpact":"HIGH","integrityImpact":"HIGH","privilegesRequired":"NONE","scope":"UNCHANGED","userInteraction":"REQUIRED","vectorString":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H","version":"3.1"},"metric_type":"cvssV3_1"}
- cve_program_cvelist_v5cvssurn:baitaphish:normalized-source-record:v2:874655d40c465b928ebe8115f739b2f94abeed3aeeb54c6135ae6f47f891ce13 · sha256:96f916576d57d311… · /containers/cna/metrics/0/cvssV3_1
CWE assertions
1 source assertion{"cweId":"CWE-94","description":"CWE-94: Improper Control of Generation of Code ('Code Injection')","lang":"en","type":"CWE"}
- cve_program_cvelist_v5cweurn:baitaphish:normalized-source-record:v2:874655d40c465b928ebe8115f739b2f94abeed3aeeb54c6135ae6f47f891ce13 · sha256:96f916576d57d311… · /containers/cna/problemTypes/0/descriptions/0
Source references
4 source assertions{"name":"https://github.com/koxudaxi/datamodel-code-generator/commit/2c93c9b712f43391dcfa975a1e4aa0b7c93ccbba","tags":["x_refsource_MISC"],"url":"https://github.com/koxudaxi/datamodel-code-generator/commit/2c93c9b712f43391dcfa975a1e4aa0b7c93ccbba"}
- cve_program_cvelist_v5referenceurn:baitaphish:normalized-source-record:v2:874655d40c465b928ebe8115f739b2f94abeed3aeeb54c6135ae6f47f891ce13 · sha256:96f916576d57d311… · /containers/cna/references/1
{"name":"https://github.com/koxudaxi/datamodel-code-generator/releases/tag/0.60.2","tags":["x_refsource_MISC"],"url":"https://github.com/koxudaxi/datamodel-code-generator/releases/tag/0.60.2"}
- cve_program_cvelist_v5referenceurn:baitaphish:normalized-source-record:v2:874655d40c465b928ebe8115f739b2f94abeed3aeeb54c6135ae6f47f891ce13 · sha256:96f916576d57d311… · /containers/cna/references/2
{"name":"https://github.com/koxudaxi/datamodel-code-generator/security/advisories/GHSA-m34r-v34r-rf9q","tags":["x_refsource_CONFIRM"],"url":"https://github.com/koxudaxi/datamodel-code-generator/security/advisories/GHSA-m34r-v34r-rf9q"}
- cve_program_cvelist_v5referenceurn:baitaphish:normalized-source-record:v2:874655d40c465b928ebe8115f739b2f94abeed3aeeb54c6135ae6f47f891ce13 · sha256:96f916576d57d311… · /containers/cna/references/0
{"tags":["exploit"],"url":"https://github.com/koxudaxi/datamodel-code-generator/security/advisories/GHSA-m34r-v34r-rf9q"}
- cve_program_cvelist_v5referenceurn:baitaphish:normalized-source-record:v2:874655d40c465b928ebe8115f739b2f94abeed3aeeb54c6135ae6f47f891ce13 · sha256:96f916576d57d311… · /containers/adp/0/references/0
Attribution and limitations
- CVE Program CVEList V5: Reproduce the MITRE copyright designation and CVE license in copies. Source →
Provider severity values are preserved separately. Baitaphish does not convert them into a risk rating, infer affected products, or treat EPSS as observed exploitation.