Machine-written summary
Summary written by Claude Haiku from the source advisory. Not reviewed by a person.
Versions of datamodel-code-generator from 0.52.1 before 0.60.2 are affected when the Pydantic v2 output mode is used. An attacker who can supply the --extra-template-data file can inject arbitrary Python expressions into the generated code's validator decorators, which run when the developer imports the generated module. Upgrade to 0.60.2 or later. The source gives few details on the exact trigger conditions beyond this.
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 |
|---|---|---|---|---|
| 7.8 | High | 3.1 | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H | CNA (GitHub_M) |
- CISA KEV Not listed.
- EPSS 0.0025, the 16th percentile, on 13 Nov 2026: FIRST’s estimate of the chance of exploitation in the next 30 days.
Timeline
- 31 Oct 2026, 14:41 UTC First seen by agentprime
- 31 Oct 2026, 14:41 UTC Confirmed by OSV
Sources
- GitHub Advisory Database: GHSA-8m8r-38jm-f355
- OSV: GHSA-8m8r-38jm-f355
- github.com/koxudaxi/datamodel-code-generator/security/advisories/GHSA-8m8r-38jm-f355
- github.com/koxudaxi/datamodel-code-generator/commit/a43d02906111a2fdcaf13ee5b62eb2da85376f19
- github.com/koxudaxi/datamodel-code-generator
- github.com/koxudaxi/datamodel-code-generator/releases/tag/0.60.2