top of page
perceptive_background_267k.jpg

datamodel-code-generator generates Pydantic v2 models, dataclasses, TypedDict, and msgspec.Struct from OpenAPI, JSON Schema, GraphQL, Avro, Protobuf, and raw JS…

Published:

28 July 2026 at 00:00:00

Alert date:

29 July 2026 at 01:04:30

Source:

nvd.nist.gov

Click to open the original link from this advisory

Supply Chain & Dependencies, Web Technologies

CVE-2026-54690 affects datamodel-code-generator versions 0.9.1 through 0.61.0, a tool that generates Pydantic v2 models and other data structures from various schema formats. The vulnerability allows server-side request forgery (SSRF) by silently dereferencing attacker-controlled JSON Schema $ref HTTP/HTTPS URLs. The flaw exists in src/datamodel_code_generator/parser/jsonschema.py via the _get_ref_body function. The --allow-remote-refs flag, intended as a security gate, only warns rather than blocking the malicious requests, making it ineffective as a control. The HTTP request logic in src/datamodel_code_generator/http.py is the mechanism through which the SSRF occurs. An attacker supplying a malicious schema could cause the server running datamodel-code-generator to make arbitrary outbound HTTP/HTTPS requests. The issue has been patched in version 0.61.0 of the library.

Technical details

Mitigation steps:

Affected products:

datamodel-code-generator

Related links:

Related CVE's:

Related threat actors:

IOC's:

This article was created with the assistance of AI technology by Perceptive.

© 2025 by Perceptive Security. All rights reserved.

email: info@perceptivesecurity.com

Disclaimer: Deze website toont informatie afkomstig van externe bronnen. Perceptive aanvaardt geen verantwoordelijkheid voor de inhoud, juistheid of volledigheid van deze informatie.

bottom of page