PatchSiren cyber security CVE debrief
CVE-2026-107377 datamodel-code-generator CVE debrief
A vulnerability in `datamodel-code-generator` allows an attacker to write files outside the intended temporary directory when processing an attacker-controlled Protobuf schema. This could lead to the creation of directories and files at writable locations, and potentially overwrite existing files. However, the written content is limited to a generated Protobuf syntax declaration.
- Vendor
- datamodel-code-generator
- Product
- Unknown
- CVSS
- HIGH 7.5
- CISA KEV
- Not listed in stored evidence
- Original CVE published
- 2026-10-08
- Original CVE updated
- 2026-10-14
- Advisory published
- 2026-10-08
- Advisory updated
- 2026-10-14
Who should care
Defenders responsible for systems using `datamodel-code-generator` versions between 0.59.0 and 0.81.0 should assess exposure and prioritize remediation. This includes developers, DevOps teams, and security professionals managing Python environments.
Why it matters
CVE-2026-107377 allows an attacker to write files outside the intended temporary directory in `datamodel-code-generator`, potentially creating directories and files or overwriting existing ones. Defenders should assess exposure, prioritize remediation, and implement compensating controls to mitigate risks.
- File system modifications could lead to unexpected behavior or security risks in affected systems.
- Potential for data loss or corruption if existing files are overwritten.
- Increased risk of lateral movement if an attacker can write to sensitive directories.
- Requires verification of affected versions and remediation to prevent exploitation.
Technical summary
The `datamodel-code-generator` library is vulnerable to a path traversal attack when processing Protobuf schemas. An attacker could create files and directories outside the intended temporary directory, potentially overwriting existing files. However, the content of the written files is limited to Protobuf syntax declarations. This issue allows an attacker to write files outside the intended temporary directory in `datamodel-code-generator`, potentially creating directories and files or overwriting existing ones. The vulnerability exists in versions of `datamodel-code-generator` from 0.59.0 up to but not including 0.81.0. The issue is triggered when a user or CI job processes an attacker-controlled schema. The
Defensive priority
High
Recommended defensive actions
- Assess exposure by reviewing systems and deployment contexts using `datamodel-code-generator` versions between 0.59.0 and 0.81.0.
- Verify inventory of affected systems and prioritize remediation for high-risk environments.
- Implement compensating controls such as restricting write access to sensitive directories.
- Monitor for suspicious file system activity related to `datamodel-code-generator` processes.
- Review relevant monitoring, detection, and logs for exposed assets that need extra review.
- Track exceptions, retest remediated assets, and close the item only after evidence is documented.
- Plan vendor-supported updates or mitigations through normal change control where exposure is confirmed.
Evidence notes
The vulnerability exists in versions of `datamodel-code-generator` from 0.59.0 up to but not including 0.81.0. The issue is triggered when a user or CI job processes an attacker-controlled schema. The fix has been merged into version 0.81.0.
Sources and references
Verified primary and authoritative sources
-
CVE-2026-107377 CVE Program record
Publisher, destination, and source semantics verified
URL: https://www.cve.org/CVERecord?id=CVE-2026-107377
CVE Program - Official CVE Program record with source-provided CVE metadata.
-
CVE-2026-107377 NVD vulnerability detail
Publisher, destination, and source semantics verified
URL: https://nvd.nist.gov/vuln/detail/CVE-2026-107377
NIST National Vulnerability Database - Official NIST NVD detail page and source-specific vulnerability assessment.
Supplemental references
-
datamodel-code-generator: Protobuf weak-import path traversal allows files to be written outside
Unverified legacy reference
URL: https://storage.googleapis.com/osv-vulnerabilities/PyPI/GHSA-77xj-x4rm-935c.json
osv_dev
-
Source reference
Unverified legacy reference
URL: https://github.com/datamodel-code-generator/datamodel-code-generator/security/advisories/GHSA-77xj-x4rm-935c
Supplemental source
-
Source reference
Unverified legacy reference
URL: https://github.com/datamodel-code-generator/datamodel-code-generator/commit/5e94b8f4203198798ec66b8e48217f70af69a0dc
Supplemental source
-
Source reference
Unverified legacy reference
URL: https://github.com/datamodel-code-generator/datamodel-code-generator
Supplemental source
-
Source reference
Unverified legacy reference
URL: https://github.com/datamodel-code-generator/datamodel-code-generator/releases/tag/0.81.0
Supplemental source
Methodology and review provenance
AI-assisted synthesis based on stored public vulnerability evidence. System validation, approval state, and publication status do not by themselves establish human review of this revision. PatchSiren helps prioritize defensive review and does not prove exposure or remediation on any system.