CVE-2026-54654

HIGHPre-NVD 7.87.8
EchelonGraph scoreMEDIUM confidence

This high-severity CVE scores 7.8 under a secondary CVSS source (NVD's own analysis pending). EPSS exploit probability: 0.1%, top 96% 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).

Triggered by: NVD CVSS baseline
Sources: epss, secondary
Trending — 3 sources updated this weekElevated
7.8EG
EchelonGraph verdictPlan a fixSerious severity, but no confirmed exploitation yet.
  • High severity, but no confirmed exploitation yet
CISA-KEV: Not listedEPSS PROB: 0%CVSS: 7.8Exploit: Elevated riskExposed: 0

No vendor fix yet — apply a workaround or compensating control (WAF / firewall / segmentation) and watch for a patch.

datamodel-code-generator generates Python data models from schema definitions. From 0.14.1 until 0.60.2, the --extra-template-data comment field is rendered into Python comments in src/datamodel_code_generator/model/template/TypeAliasAnnotation.jinja2, src/datamodel_code_generator/model/template/TypedDict.jinja2, src/datamodel_code_generator/model/template/dataclass.jinja2, src/datamodel_code_generator/model/template/msgspec.Struct.jinja2, src/datamodel_code_generator/model/template/pydantic/BaseModel.jinja2, and src/datamodel_code_generator/model/template/pydantic_v2/BaseModel.jinja2 without neutralizing carriage returns in Python # comments, allowing an attacker-controlled comment value to inject Python code into generated models that runs when imported. This issue is fixed in version 0.60.2.

CVSS v3
7.8
EG Score
7.8(medium)
EG Risk
51(Track*)
EG Risk 51/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 computed
Severity78% × 45%
Exploitation40% × 40%
Automatability0% × 15%
Action: Watch closely — could escalate to Attend.
EPSS PROB
0%
EPSS %ILE
4%
KEV
Not listed

Published

July 28, 2026

Last Modified

July 29, 2026

Advisory Details (3)

Auto-updated Jul 28, 2026
🔬 Proof of concept available. Patch available. Sources: github, github_commit, github_release.
github_release Patch Available

0.60.2

Patch available: koxudaxi/datamodel-code-generator 0.60.2

https://github.com/koxudaxi/datamodel-code-generator/releases/tag/0.60.2
github_commit Patch Available

commit b73abb5cd703 (koxudaxi/datamodel-code-generator)

Patch available: koxudaxi/datamodel-code-generator 0.60.2 (contains commit b73abb5cd703)

https://github.com/koxudaxi/datamodel-code-generator/commit/b73abb5cd703a50471b8950bbd3bd0b82ad71de7
github Patch Available🟡 PoC Available

Code injection in `datamodel-code-generator` via unescaped carriage return in `--extra-template-data` `comment` field · Advisory · koxudaxi/datamodel-code-generator · GitHub

https://github.com/koxudaxi/datamodel-code-generator/security/advisories/GHSA-wjv6-jcfj-mf9r

Vendor Advisories for CVE-2026-54654(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)
PackageVulnerable rangeFixed inDependents
datamodel-code-generator0.14.1 ... 0.60.1 (94 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.

  1. 2026-07-30 04:53 UTCEG score recompute
  2. 2026-07-30 01:30 UTCEPSS rescore
  3. 2026-07-29 16:25 UTCEG score recompute
  4. 2026-07-29 15:33 UTCEG score recompute
  5. 2026-07-28 22:27 UTCEG score recompute
  6. 2026-07-28 21:29 UTCEG score recompute
  7. 2026-07-28 21:28 UTCMITRE cvelistV5first tracked

Frequently asked(5)

What is CVE-2026-54654?
CVE-2026-54654 is a high vulnerability published on July 28, 2026. datamodel-code-generator generates Python data models from schema definitions. From 0.14.1 until 0.60.2, the --extra-template-data comment field is rendered into Python comments in src/datamodelcodegenerator/model/template/TypeAliasAnnotation.jinja2,…
When was CVE-2026-54654 disclosed?
CVE-2026-54654 was first published in the National Vulnerability Database on July 28, 2026, with the most recent update on July 29, 2026. EchelonGraph re-ingests CVE updates from NVD on a 2-hour cycle, so this page reflects the latest published state.
Is CVE-2026-54654 actively exploited?
CVE-2026-54654 is not currently on CISA's Known Exploited Vulnerabilities catalog. FIRST EPSS estimates a 0% probability of exploitation in the next 30 days, which ranks it in the top 96.0% of all scored CVEs.
What is the CVSS score of CVE-2026-54654?
CVE-2026-54654 has a CVSS v3 base score of 7.8 (NVD).
How do I remediate CVE-2026-54654?
Patch to the fixed version published by the affected vendor. Where vendor advisories exist for CVE-2026-54654, EchelonGraph cross-links them in the Vendor Advisories panel below — those typically contain the canonical remediation steps, fixed version numbers, and any vendor-specific mitigations.

Dependency Blast Radius

See which npm, PyPI, Go, and Maven packages are affected by CVE-2026-54654

Explore →

Is Your Infrastructure Affected by CVE-2026-54654?

EchelonGraph automatically scans your cloud infrastructure and maps CVE exposure using blast radius analysis.