Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1359 CNY

100%

CVE-2026-107377— datamodel-code-generator: Protobuf weak-import path traversal allows files to be written outside the temporary directory

Quick assessment

Affected
datamodel-code-generator datamodel-code-generator
Exploitation
No confirmed in-the-wild exploitation; assess based on exposure
Recommended action
Check the vendor advisory and references for a fixed version. If immediate upgrade is impossible, restrict exposure and increase monitoring.

datamodel-code-generator 是一种从模式定义(schema definitions)生成 Python 数据模型的开源工具。在版本 0.59.0 至 0.81.0 之间,存在一个安全漏洞:攻击者可以构造恶意的 Protocol Buffers(Protobuf)模式文件,其中包含通过 WEAK_IMPORT_PATTERN 捕获的绝对路径或父目录路径。这些路径随后被 src/datamodel_code_generator/parser/protobuf.py 中的 _write_missin

CVSS 7.5 · High

Affected Version Matrix 1

VendorProduct Version RangeStatus
datamodel-code-generator datamodel-code-generator >= 0.59.0, < 0.81.0 affected
Get alerts for future matching vulnerabilities Log in to subscribe

I. Basic Information for CVE-2026-107377

Vulnerability Information

Have questions about the vulnerability? See if Shenlong's analysis helps!
View Shenlong Deep Dive ↗

Although we use advanced large model technology, its output may still contain inaccurate or outdated information.Shenlong tries to ensure data accuracy, but please verify and judge based on the actual situation.

Vulnerability Title
datamodel-code-generator: Protobuf weak-import path traversal allows files to be written outside the temporary directory
Source: CVE Program / CVE List V5
Vulnerability Description
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.
Source: CVE Program / CVE List V5
CVSS Information
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
Source: CVE Program / CVE List V5
Vulnerability Type
对路径名的限制不恰当(路径遍历)
Source: CVE Program / CVE List V5

Affected Products

Vendor Product Affected Versions CPE Subscribe
datamodel-code-generator datamodel-code-generator >= 0.59.0, < 0.81.0 -

II. Public POCs for CVE-2026-107377

# POC Description Source Link Shenlong Link
AI-Generated POC Premium

No public POC found.

Login to generate AI POC

III. Intelligence Information for CVE-2026-107377

请登录查看更多情报信息。

Other References for CVE-2026-107377 (3)

IV. Related Vulnerabilities

V. Comments for CVE-2026-107377

No comments yet


Leave a comment