top of page
perceptive_background_267k.jpg

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

Click to open the original link from this advisory

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:

Related CVE's:

Related threat actors:

IOC's:

This article was created with the assistance of AI technology by Perceptive.

© 2025 by Perceptive Security. All rights reserved.

email: info@perceptivesecurity.com

Deze website toont informatie afkomstig van externe bronnen; Perceptive aanvaardt geen verantwoordelijkheid voor de juistheid, volledigheid of actualiteit van deze informatie.

bottom of page