Quick answers
- Is CVE-2026-107377 exploited in the wild?
- No. Junglewise Threat Intelligence has no report of CVE-2026-107377 being exploited in the wild.
- How severe is CVE-2026-107377?
- High severity, with a CVSS score of 7.5, published 8 October 2026.
- Which products and versions are affected?
- Datamodel-Code-Generator <=0.80.0; datamodel-code-generator (PyPI) >= 0.59.0, <= 0.80.0, ECOSYSTEM:introduced=0.59.0,fixed=0.81.0.
- Is there a fix for CVE-2026-107377?
- Yes. datamodel-code-generator (PyPI): upgrade to 0.81.0 or later. Until then: Do not process untrusted Protobuf schemas with datamodel-code-generator; restrict use to internal, trusted schemas until a patched release is available. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
- How is CVE-2026-107377 attacked?
- It is attacked over the network, in a software library.
- Am I affected by CVE-2026-107377?
- Check whether you run Datamodel-Code-Generator or datamodel-code-generator (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.
How to fix
- datamodel-code-generator (PyPI): upgrade to 0.81.0 or later
pip install "datamodel-code-generator>=0.81.0"
Do not process untrusted Protobuf schemas with datamodel-code-generator; restrict use to internal, trusted schemas until a patched release is available.
Technical details
The vulnerability exists in the Protobuf weak-import handler (`_write_missing_weak_imports`) which concatenates an attacker-controlled import path from the schema directly into a filesystem write operation without path normalization or containment checks. Absolute paths and `../` sequences in the weak-import statement can escape the `__weak_import__` temporary directory. The code also has a timing flaw: it checks whether a file exists in one location but writes to a different base directory, allowing relative paths to overwrite existing files. The attack triggers before protoc validation, so compilation failure does not roll back the write.
Affected products
- datamodel-code-generator datamodel-code-generator <=0.80.0
Identifiers
- CVE-2026-107377
- GHSA-77xj-x4rm-935c
- PYSEC-2026-4205
Timeline
- 2026-10-08: disclosed