UBUNTU-CVE-2026-107377

Source
https://ubuntu.com/security/CVE-2026-107377
Import Source
https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-107377.json
JSON Data
https://api.osv.dev/v1/vulns/UBUNTU-CVE-2026-107377
Upstream
Published
2026-10-13T00:00:00Z
Modified
2026-10-14T03:22:47Z
Severity
  • 7.5 (High) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N CVSS Calculator
  • Ubuntu - medium
Summary
[none]
Details

datamodel-code-generator generates Python data models from schema definitions. From 0.59.0 until 0.81.0, an attacker-controlled Protobuf schema can supply absolute or parent-directory paths captured by WEAK_IMPORT_PATTERN and consumed by _write_missing_weak_imports in src/datamodel_code_generator/parser/protobuf.py. Exploitation requires a victim or automated job to process the attacker-controlled schema with Protobuf input support, which requires the grpcio-tools package. The paths escape the weak_imports temporary directory before protoc runs, allowing creation of directory trees and new files or overwrite of existing writable files with a generated Protobuf syntax declaration. The effect persists when later Protobuf compilation fails. The written content is limited to a proto2 or proto3 syntax declaration, and direct arbitrary code execution has not been demonstrated. This issue is fixed in version 0.81.0.

References

Affected packages

Ubuntu:26.04:LTS / python-datamodel-code-generator

Package

Name
python-datamodel-code-generator
Purl
pkg:deb/ubuntu/python-datamodel-code-generator?arch=source&distro=resolute

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0 Unknown introduced version / All previous versions are affected

Affected versions

0.*
0.26.4-3
0.45.0-1

Ecosystem specific

{
    "binaries":  [
        {
            "binary_name":  "datamodel-codegen",
            "binary_version":  "0.45.0-1"
        },
        {
            "binary_name":  "python3-datamodel-code-generator",
            "binary_version":  "0.45.0-1"
        }
    ]
}

Database specific

source
"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-107377.json"