CVE Explorer
CVE-2026-54621
datamodel-code-generator generates Python data models from schema definitions. Prior to 0.60.1, GraphQL Union description values in src/datamodel_code_generator/model/template/UnionTypeStatement.jinja2 and src/datamodel_code_generator/model/template/UnionTypeStatement.py312.jinja2 are rendered into Python comments without neutralizing carriage returns in Python # comments, allowing attacker-controlled GraphQL schema content to inject Python code into generated models that runs when imported. Thi
Known exploited
Not asserted
Disputed
No
Stale source
No
Conflicts
1
Preserved source conflicts
No provider value was silently selected as the winner.
cwe · 2 assertions
{"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:a40c6308796a83f4d2ba63d5e5b6b6e48c09efcc1f31c06c1613c660935c8c1f · sha256:c6c6cf26cd016b27… · /containers/cna/problemTypes/0/descriptions/0
{"cweId":"CWE-1336","description":"CWE-1336: Improper Neutralization of Special Elements Used in a Template Engine","lang":"en","type":"CWE"}
- cve_program_cvelist_v5cweurn:baitaphish:normalized-source-record:v2:a40c6308796a83f4d2ba63d5e5b6b6e48c09efcc1f31c06c1613c660935c8c1f · sha256:c6c6cf26cd016b27… · /containers/cna/problemTypes/1/descriptions/0
Affected products and versions
1 source assertion{"product":"datamodel-code-generator","vendor":"koxudaxi","versions":[{"status":"affected","version":">= 0.25.0, < 0.60.1"}]}
- cve_program_cvelist_v5affectedurn:baitaphish:normalized-source-record:v2:a40c6308796a83f4d2ba63d5e5b6b6e48c09efcc1f31c06c1613c660935c8c1f · sha256:c6c6cf26cd016b27… · /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:a40c6308796a83f4d2ba63d5e5b6b6e48c09efcc1f31c06c1613c660935c8c1f · sha256:c6c6cf26cd016b27… · /containers/cna/metrics/0/cvssV3_1
CWE assertions
2 source assertions{"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:a40c6308796a83f4d2ba63d5e5b6b6e48c09efcc1f31c06c1613c660935c8c1f · sha256:c6c6cf26cd016b27… · /containers/cna/problemTypes/0/descriptions/0
{"cweId":"CWE-1336","description":"CWE-1336: Improper Neutralization of Special Elements Used in a Template Engine","lang":"en","type":"CWE"}
- cve_program_cvelist_v5cweurn:baitaphish:normalized-source-record:v2:a40c6308796a83f4d2ba63d5e5b6b6e48c09efcc1f31c06c1613c660935c8c1f · sha256:c6c6cf26cd016b27… · /containers/cna/problemTypes/1/descriptions/0
Source references
3 source assertions{"name":"https://github.com/koxudaxi/datamodel-code-generator/commit/aec47bc414779f4a9992b3919c8f7663afd6c988","tags":["x_refsource_MISC"],"url":"https://github.com/koxudaxi/datamodel-code-generator/commit/aec47bc414779f4a9992b3919c8f7663afd6c988"}
- cve_program_cvelist_v5referenceurn:baitaphish:normalized-source-record:v2:a40c6308796a83f4d2ba63d5e5b6b6e48c09efcc1f31c06c1613c660935c8c1f · sha256:c6c6cf26cd016b27… · /containers/cna/references/1
{"name":"https://github.com/koxudaxi/datamodel-code-generator/releases/tag/0.60.1","tags":["x_refsource_MISC"],"url":"https://github.com/koxudaxi/datamodel-code-generator/releases/tag/0.60.1"}
- cve_program_cvelist_v5referenceurn:baitaphish:normalized-source-record:v2:a40c6308796a83f4d2ba63d5e5b6b6e48c09efcc1f31c06c1613c660935c8c1f · sha256:c6c6cf26cd016b27… · /containers/cna/references/2
{"name":"https://github.com/koxudaxi/datamodel-code-generator/security/advisories/GHSA-j884-q54q-mmx3","tags":["x_refsource_CONFIRM"],"url":"https://github.com/koxudaxi/datamodel-code-generator/security/advisories/GHSA-j884-q54q-mmx3"}
- cve_program_cvelist_v5referenceurn:baitaphish:normalized-source-record:v2:a40c6308796a83f4d2ba63d5e5b6b6e48c09efcc1f31c06c1613c660935c8c1f · sha256:c6c6cf26cd016b27… · /containers/cna/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.