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.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:NKoxudaxi Datamodel Code Generator
APPKoxudaxi< 0.62.0
Related vulnerabilities
datamodel-code-generator: wstrzyknięcie kodu Python przez default_factory
RCE w datamodel-code-generator poprzez niezabezpieczoną interpolację walidatorów
SSRF w datamodel-code-generator poprzez nieblokowane zewnętrzne $ref
SSRF przez DNS rebinding w datamodel-code-generator (przed 0.63.0)
Code injection w datamodel-code-generator poprzez rozszerzenia schematu