176 matches found
PYSEC-2026-3566 `datamodel-code-generator` vulnerable to code injection via unescaped carriage return in `--extra-template-data` `comment` field
Summary datamodel-code-generator is vulnerable to code injection when a developer passes an --extra-template-data file whose comment value contains a literal \r carriage return. The comment variable is rendered into a Python comment in six built-in templates with no line-terminator escaping...
PYSEC-2026-3564 datamodel-code-generator vulnerable to SSRF via --url: no host/IP validation, follows redirects
Summary datamodel-code-generator's built-in HTTP fetcher http.getbody issues an httpx.GET against any URL passed to --url or reached via a redirect chain with no allow-list, no deny-list, no IP/host validation, and followredirects=True. Loopback addresses, RFC1918 ranges, link-local 169.254.169.2...
PYSEC-2026-3558 datamodel-code-generator vulnerable to arbitrary local file read via JSON-Schema `$ref` (`file://` and `../` traversal), bypassing `--no-allow-remote-refs`
Summary datamodel-code-generator resolves JSON-Schema $ref targets that point at the local filesystem without restricting them to the input/base directory and without honoring the remote-reference security control. In the default configuration, an attacker who controls an input schema a "paste yo...
PYSEC-2026-3563 datamodel-code-generator: Authorization / request headers leaked to cross-origin redirect target when fetching remote schemas
Summary When datamodel-code-generator fetches a remote schema and follows an HTTP redirect, it re-sends the original request headers, including any Authorization header, to the redirect target even when the redirect changes origin host/port/scheme. Credentials that an operator scoped to a trusted...
PYSEC-2026-3560 datamodel-code-generator vulnerable to SSRF via JSON-Schema `$ref` to HTTP URL (silent by default)
Summary JSON-Schema $ref values pointing at HTTP or HTTPS URLs are silently dereferenced by datamodel-code-generator with no IP/host validation, no scheme allow-list, and redirects followed unconditionally. The --allow-remote-refs gate added in 0.56.0 defaults to None, which only emits a...
Exploit for CVE-2026-63720
CVE-2026-63720: Code Injection in datamodel-code-generator via...
Code Injection
datamodel-code-generator is vulnerable to Code Injection. The vulnerability is due to insufficient validation of x-python-type values from attacker-controlled JSON Schema content before inserting them into generated Python field annotations, which allows an attacker to execute arbitrary Python co...
Sensitive Information Exposure
datamodel-code-generator is vulnerable to Sensitive Information Exposure. The vulnerability is due to the reuse of Authorization, Cookie, and Proxy-Authorization headers when following cross-origin redirects while fetching remote schemas, which allows an attacker controlling a redirect target to...
Server-Side Request Forgery (SSRF)
datamodel-code-generator is vulnerable to Server-Side Request Forgery SSRF. The vulnerability is due to http.getbody in src/datamodelcodegenerator/http.py accepting --url targets and redirect chain targets without proper host/IP validation, which allows an attacker to perform server-side request...
Path Traversal
datamodel-code-generator is vulnerable to Path Traversal. The vulnerability is due to improper validation of schemaLocation values in XML Schema parsing xs:include, xs:import, xs:redefine, and xs:override, which allows an attacker to reference files outside the intended input base path, resulting...
SUSE CVE-2026-55391
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.63.0, datamodel-code-generator validates a URL host once in src/datamodelcodegenerator/http.py through...
SUSE CVE-2026-55415
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.11.6 until 0.64.0, datamodel-code-generator allows attacker-controlled x-python-import or customTypePath schema...
SUSE CVE-2026-63720
datamodel-code-generator prior to version 0.70.0 contains a code injection vulnerability that allows attackers who control input schemas to achieve remote code execution by supplying a malicious customBasePath value containing embedded newlines and a dot-free Python expression. The crafted value ...
CVE-2026-54654
creationtimestamp| type| source ---|---|--- 2026-07-28 22:35:44+00:00| published-proof-of-concept| https://github.com/koxudaxi/datamodel-code-generator/security/advisories/GHSA-wjv6-jcfj-mf9r 2026-07-29 03:28:01+00:00| seen| https://bsky.app/profile/postac001.bsky.social/post/3mrqy7iat4v2y...
CVE-2026-55403
creationtimestamp| type| source ---|---|--- 2026-07-28 22:35:27+00:00| published-proof-of-concept| https://github.com/koxudaxi/datamodel-code-generator/security/advisories/GHSA-r5vv-ff45-prp2 2026-07-29 00:00:47+00:00| seen| https://bsky.app/profile/cve.skyfleet.blue/post/3mrqmmvyow724...
CVE-2026-54655
creationtimestamp| type| source ---|---|--- 2026-07-28 22:35:24+00:00| published-proof-of-concept| https://github.com/koxudaxi/datamodel-code-generator/security/advisories/GHSA-m34r-v34r-rf9q...
CVE-2026-55391
creationtimestamp| type| source ---|---|--- 2026-07-28 22:35:11+00:00| published-proof-of-concept| https://github.com/koxudaxi/datamodel-code-generator/security/advisories/GHSA-vx7x-vcc2-c44g 2026-07-28 23:01:10+00:00| seen| https://bsky.app/profile/thehackerwire.bsky.social/post/3mrqjccj7di2u...
CVE-2026-55389
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...
CVE-2026-55390
datamodel-code-generator generates Python data models from schema definitions. From 0.59.0 until 0.62.0, XML Schema parsing in src/datamodelcodegenerator/parser/xmlschema.py for --input-file-type xmlschema resolves xs:include, xs:import, xs:redefine, and xs:override schemaLocation values outside...
CVE-2026-55391
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.63.0, datamodel-code-generator validates a URL host once in src/datamodelcodegenerator/http.py through...