3 matches found
CVE-2026-54653
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. From 0.17.0 until 0.60.2, datamodel-code-generator preserves attacker-controlled defaultfactory values in...
`datamodel-code-generator` vulnerable to code injection in via attacker-controlled `default_factory` schema field
Summary datamodel-code-generator is vulnerable to code injection when generating Python models from an attacker-controlled JSON Schema, OpenAPI, YAML, JSON, Avro, Protobuf, or XSD schema. When a property carries a "defaultfactory" key, its value is interpolated verbatim — as a raw Python expressi...
CVE-2026-54653
The CVE affects the datamodel-code-generator project. From versions 0.17.0 through 0.60.2, the tool could preserve attacker-controlled default_factory values in JsonSchemaObject.init/get_field_extras, emitting them into Field(default_factory=...) and enabling Python expression execution when the ...