PYPI · JULY 2026 · EARLY WARNING

datamodel-code-generator Vulnerability: Schema-Driven Code Execution

EARLY WARNING · UNCONFIRMED. This page describes a developing threat that 0Day surfaced from early signals and has not yet independently confirmed. Details may change. Always verify against the primary sources before acting.
GHSA-5578-W22F-PFX9Severity: HIGH

An early warning has been issued regarding a potential vulnerability in the datamodel-code-generator package that could allow arbitrary Python code execution through malicious input schemas.

What happened

Reports indicate that the datamodel-code-generator package may be susceptible to a schema-content-driven remote code execution vulnerability. This vulnerability appears to enable the execution of arbitrary Python code on the machine that imports the generated model, if a malicious input schema is used. The affected versions range from 0.17.0 to 0.60.1, with fixes available in version 0.60.2 and later. It is recommended to avoid using untrusted input schemas with the datamodel-code-generator package until a fix is confirmed and applied. For detailed version information and fixes, consult the primary sources.

How 0Day mitigates this

MATCHED TO YOUR ACTUAL DEPENDENCY GRAPH0Day matches every incoming threat signal against your GitHub organization’s full dependency graph, including transitive dependencies. If datamodel-code-generator is anywhere in your dependency tree, the engineers who own the affected repositories get a push alert the moment it is flagged — no manual audit to remember to run.

Read how this differs from waiting on a scanner to catch a known advisory, or see the exact, read-only access 0Day needs to do this for an organization.

Join the 0Day waitlist →

← Back to all threats