CVE-2026-55389Koxudaxi Datamodel-code-generator
High 7.5 No auth needed
Follow: this CVE · Koxudaxi · Koxudaxi Datamodel-code-generator We alert you by email or Slack (account required).
- Priority
- 60
- CVSS 3.1
- 7.5
- EPSS
- —
- Auth required
- No
- Published
- Jul 28, 2026
- Updated
- Oct 23, 2026
- Category
- Application · Cross-platform
- SSVC (CISA)
- Exploitation: proof of concept · Automatable: yes · Technical impact: partial
- Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
What happens
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.
What to do
- Apply the vendor's security update for Datamodel-code-generator.
- It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How to upgrade |
|---|---|---|---|---|
| PyPI | datamodel-code-generator |
< 0.62.0 |
0.62.0 |
pip install "datamodel-code-generator>=0.62.0" |
| PyPI | datamodel-code-generator |
< 0.62.0 |
0.62.0 |
pip install "datamodel-code-generator>=0.62.0" |
Per OSV / GitHub Advisories (GHSA-8359-h9fx-j6v9, PYSEC-2026-3558). Check the version in your lockfile before upgrading.
Affected products (CPE)
| Vendor | Product | Versions |
|---|---|---|
| koxudaxi | datamodel-code-generator | < 0.62.0 |
Official sources
References
Links published by the sources. Open them with care.
- github.com Patch
- github.com Release Notes
- github.com Exploit Vendor Advisory