datamodel-code-generator generates Pydantic v2 models, dataclasses, TypedDict, and msgspec.Struct from OpenAPI, JSON Schema, GraphQL, Avro, Protobuf, and raw JSON, YAML, or CSV. Prior to 0.62.0, datamodel-code-generator resolves JSON Schema $ref targets in src/datamodel_code_generator/parser/jsonschema.py through is_url and _get_ref_body without containing file:// or ../ traversal references to the input directory and without honoring --no-allow-remote-refs, allowing arbitrary local file reads. This issue is fixed in version 0.62.0.
Description as published by the source, in English.
Key facts
Published
2026-07-28
Last modified
2026-10-23
Assigned by
security-advisories@github.com
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
Scored by
security-advisories@github.com
Probability of exploitation
0.4 %
higher than 29 %
of all known vulnerabilities
EPSS, next 30 days, model v2026.06.15
The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special ele…
The product uses an externally controlled name or reference that resolves to a resource that is outside of the intended control sphere.
Attack techniques
Derived through the weakness type: CVE to CWE to CAPEC to ATT&CK.
This shows which techniques the weakness class is historically used for.
It does not assert that this vulnerability has been exploited that way.
T1007: System Service Discovery discovery
T1016: System Network Configuration Discovery discovery
T1018: Remote System Discovery discovery
T1033: System Owner/User Discovery discovery
T1036.005: Match Legitimate Resource Name or Location stealth
T1046: Network Service Discovery discovery
T1049: System Network Connections Discovery discovery