datamodel-code-generator: Protobuf weak-import path traversal allows files to be written outside the temporary
Affects datamodel-code-generatorSource GCVE Database
Not known to be exploited · CVSS 7.5 High : upgrade to 0.81.0 soon.
Data as of 22 Nov 2026, 21:14 UTC
- EPSS
- 0.5% chance of exploitation in 30 days – higher than 46% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
- Patch
- Available – fixed in 0.81.0
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:NExploitation evidence
Disclosed: evidence found.
CVE published 8 Oct 2026
Detectable: no evidence on record.
No public nuclei template indexed
Weaponized: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 22 Nov 2026.
What to do
Upgrade datamodel-code-generator to 0.81.0.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
| PyPIdatamodel-code-generator | Affected
| Fixed in
|
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
Upgrade datamodel-code-generator to version 0.81.0 or later, where the vulnerability has been fixed. Until the patched version is available, avoid processing untrusted Protobuf schemas with the tool. The vendor advisory confirms a fix has been merged and a patched release is available in 0.81.0.
Description
A path traversal vulnerability in datamodel-code-generator versions >=0.59.0 and <0.81.0 allows attacker-controlled Protobuf schemas to write files outside the intended temporary directory. The vulnerability arises from improper handling of absolute and relative import paths during weak-import stub generation, enabling creation or overwriting of files in arbitrary writable locations. The written content is limited to a fixed Protobuf syntax declaration, and no direct arbitrary code execution has been demonstrated. The issue occurs before the Protobuf compiler runs and persists despite compilation errors. A fix is available in version 0.81.0.
References
- github.com/datamodel-code-generator/datamodel-code-generator/security/advisories/GHSA-77xj-x4rm-935c (opens in a new tab)
- github.com/datamodel-code-generator/datamodel-code-generator/commit/5e94b8f4203198798ec66b8e48217f70af69a0dc (opens in a new tab)
- github.com/datamodel-code-generator/datamodel-code-generator (opens in a new tab)
- github.com/datamodel-code-generator/datamodel-code-generator/releases/tag/0.81.0 (opens in a new tab)