


Perceptive Security
SOC/SIEM Consultancy

datamodel-code-generator generates Pydantic v2 models, dataclasses, TypedDict, and msgspec.Struct from OpenAPI, JSON Schema, GraphQL, Avro, Protobuf, and raw JS…
Published:
27 juli 2026 om 22:00:00
Alert date:
28 juli 2026 om 23:04:30
Source:
nvd.nist.gov
Supply Chain & Dependencies, Web Technologies, Security Tools
CVE-2026-55389 affects datamodel-code-generator prior to version 0.62.0, a tool that generates Pydantic v2 models and other data structures from various schema formats. The vulnerability exists in the JSON Schema $ref resolution logic within src/datamodel_code_generator/parser/jsonschema.py. The is_url and _get_ref_body functions fail to restrict file:// or ../ directory traversal references, and also fail to honor the --no-allow-remote-refs flag. This allows an attacker to craft malicious schema input that causes the tool to read arbitrary local files on the system. The vulnerability is classified as a path traversal / arbitrary file read issue. It has been fixed in version 0.62.0 of datamodel-code-generator. Users are advised to upgrade immediately to mitigate the risk of sensitive file disclosure.
Technical details
Mitigation steps:
Affected products:
datamodel-code-generator < 0.62.0
Related links:
https://nvd.nist.gov/vuln/detail/CVE-2026-55389
https://github.com/koxudaxi/datamodel-code-generator/commit/2ff4a72b4550a2b2069754c5b075b1655067e5fb
https://github.com/koxudaxi/datamodel-code-generator/releases/tag/0.62.0
https://github.com/koxudaxi/datamodel-code-generator/security/advisories/GHSA-8359-h9fx-j6v9
Related CVE's:
Related threat actors:
IOC's:
This article was created with the assistance of AI technology by Perceptive.
