Skip to main content
CVE-2026-107377VulnerabilityPublished

datamodel-code-generator: Protobuf weak-import path traversal allows files to be written outside the temporary

Affects datamodel-code-generatorSource GCVE Database

0
Compare

Not known to be exploited · CVSS 7.5 High : upgrade to 0.81.0 soon.

Data as of 22 Nov 2026, 21:14 UTC

CVSS 3.1 base score
7.5High
How severe the flaw is on the 0–10 CVSS scale.
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:N

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 8 Oct 2026

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponized: no evidence on record.

    No public exploit code indexed in Metasploit or Exploit-DB

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq 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

ProductAffectedFixed in
PyPIdatamodel-code-generatorAffected
  • >=0.59.0 <0.81.0
Fixed in
  • 0.81.0

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

Community reviews

Loading reviews…