CVE-2026-54653
RCE via preserved default_factory in datamodel-code-generator when importing generated models.
Is CVE-2026-54653 being exploited?
Not confirmed. CVE-2026-54653 does not appear in CISA's Known Exploited Vulnerabilities catalog, which records only exploitation that has been observed and reported publicly. That is evidence of absence of a report, not evidence the flaw is unattacked. EPSS currently estimates a 0.45% probability of exploitation in the next 30 days.
How severe is CVE-2026-54653?
CVE-2026-54653 is rated High with a CVSS score of 8.8. Severity describes how bad exploitation would be, not how likely it is: pair it with exploitation evidence before deciding what to patch first.
Is there a patch for CVE-2026-54653?
Yes. A fix has been recorded for CVE-2026-54653. The vendor advisory is the authority on the exact fixed version — apply it from there rather than from a summary.
What does CVE-2026-54653 affect?
CVE-2026-54653 affects datamodel-code-generator <= 0.60.1, Generated Pydantic v2 models, Generated dataclasses / TypedDict / msgspec.Struct, Python apps importing generated models. Confirm the exact affected versions against the vendor advisory before deciding you are exposed.
What should I do about CVE-2026-54653?
Upgrade to datamodel-code-generator >= 0.60.2 and regenerate models from trusted schemas.
Exploitation status reflects CISA's KEV catalog as we last synced it. Check the catalog directly.
Arbitrary Python code execution on import of attacker-crafted generated models via injected default_factory expressions.
Patch when possible
- affected>= 0.17.0 and < 0.60.2
As published in the CVE Program record. A version outside these ranges is not a statement that it is unaffected — vendors sometimes understate a range, and distribution-backported builds carry upstream numbers that do not reflect what was patched into them.