Machine-written summary
Summary written by Claude Haiku from the source advisory. Not reviewed by a person.
Versions 0.17.0 up to but not including 0.60.2 of datamodel-code-generator are affected. When a schema property includes a default_factory key, its value is inserted unchanged into the generated Python code, so an attacker who supplies a malicious schema can run arbitrary Python when the generated module is imported. No special flags are needed, though choosing the typing.TypedDict output model type avoids the issue. Upgrade to datamodel-code-generator 0.60.2 or later.
Not analysed yet
We haven’t published our analysis of this Advisory yet. Once a person has reviewed it, this page will say what’s vulnerable, what has to be true for your app to be affected, and how to check.
Severity and exploitation
| Score | Rating | CVSS | Vector | Source |
|---|---|---|---|---|
| 8.8 | High | 3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H | CNA (GitHub_M) |
- CISA KEV Not listed.
- EPSS 0.0071, the 54th percentile, on 13 Nov 2026: FIRST’s estimate of the chance of exploitation in the next 30 days.
Timeline
- 31 Oct 2026, 14:11 UTC First seen by agentprime
- 31 Oct 2026, 14:11 UTC Confirmed by OSV
Sources
- GitHub Advisory Database: GHSA-386q-5hp3-95m9
- OSV: GHSA-386q-5hp3-95m9
- github.com/koxudaxi/datamodel-code-generator/security/advisories/GHSA-386q-5hp3-95m9
- github.com/koxudaxi/datamodel-code-generator/commit/17fc235e234cbcfaaadef8c74cb72c9687db0d1d
- github.com/koxudaxi/datamodel-code-generator
- github.com/koxudaxi/datamodel-code-generator/releases/tag/0.60.2