LiveActive security incident?Get immediate response
CVE Record

CVE-2026-54690: datamodel-code-generator vulnerable to SSRF via JSON-Schema `$ref` to HTTP URL (silent by default)

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.9.1 until 0.61.0, datamodel-code-generator silently dereferences attacker-controlled JSON Schema $ref HTTP or HTTPS URLs in src/datamodel_code_generator/parser/jsonschema.py through _get_ref_body, and the --allow-remote-refs gate can warn instead of blocking, allowing server-side request forgery through src/datamodel_code_generator/http.py. This issue is fixed in version 0.61.0.

HighCVSS 8.2Not KEV-listedUpdated
Glexia's TakeAutomated analysishigh

Security readout for executives and security teams

Plain-English summary

Affected systems may make hidden outbound web requests when processing an attacker-controlled schema. This can expose internal services or sensitive response data to the generator process. The vulnerable behavior affects versions 0.9.1 through 0.60.x and is fixed in 0.61.0.

Executive priority

Prioritize remediation where code generation handles customer, partner, repository, or otherwise untrusted schemas and has internal network access. Upgrade promptly, then verify egress restrictions. Lower urgency may be reasonable for isolated environments processing only controlled inputs, but affected versions should still be removed from standard builds.

Technical view

CVE-2026-54690 is an SSRF vulnerability in datamodel-code-generator. Attacker-controlled HTTP or HTTPS URLs in JSON Schema `$ref` values are dereferenced through `_get_ref_body`. The `--allow-remote-refs` control may warn rather than block. CVSS 3.1 is 8.2, reflecting possible high confidentiality and low integrity impact across a changed security scope.

Likely exposure

Exposure is most likely where versions 0.9.1 through 0.60.x process untrusted or externally supplied JSON Schema or OpenAPI content. Risk increases when the generator can reach internal services, cloud metadata endpoints, or other restricted networks. Installations processing only trusted inputs still require review because remote dereferencing was silent by default.

Exploitation context

The supplied sources do not establish active exploitation, and the CVE is not listed as KEV in the source bundle. Exploitation requires a user or automated workflow to process attacker-controlled schema content. The resulting server-side request originates from the environment running datamodel-code-generator, potentially bypassing external network boundaries.

Researcher notes

The vulnerable path is identified in `parser/jsonschema.py` through `_get_ref_body`, with requests handled through `http.py`. The advisory states the remote-reference gate could warn without blocking. Assess trust boundaries, reachable destinations, redirect behavior, credentials available to the process, and whether fetched content can influence generated output. The supplied evidence does not document public exploitation.

Mitigation direction

  • Upgrade datamodel-code-generator to version 0.61.0 or later.
  • Restrict schema ingestion to trusted, authenticated sources until upgrading.
  • Limit outbound network access from code-generation environments using allowlists or equivalent controls.
  • Review vendor guidance for any additional configuration or backport instructions.

Validation and detection

  • Inventory installed and embedded datamodel-code-generator versions across development, CI, and automation environments.
  • Identify workflows that accept external JSON Schema, OpenAPI, or other attacker-influenced input.
  • Verify upgraded environments reject unauthorized remote references rather than merely warning.
  • Review network logs for unexpected HTTP or HTTPS requests originating from code-generation systems.
Prepared
Confidence
high
Sources
5

Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.

Potential ATT&CK relevance

Conservative CVE-to-ATT&CK context

These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.

ATT&CK lookup starting points

Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.

cwe · medium confidence lookup

CWE-918: Information exposure and cloud metadata lookup

Information exposure and SSRF weaknesses can make discovery, cloud metadata, and credential material review relevant. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.

Open ATT&CK lookup
description · low confidence lookup

Cloud metadata behavior lookup

The CVE wording references SSRF or metadata access, so cloud discovery and credential material review may help. This is a Glexia inferred lookup path, not an official MITRE, ATT&CK, or CVE Program mapping.

Open ATT&CK lookup
cve · low confidence lookup

CVE-2026-54690 mapping review

Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.

Open ATT&CK lookup
Vulnerability profileCVE Program record
Severity
High
CVSS
8.2 (3.1)
Known Exploited
No
Published

Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:L/A:N

Official CVE source material

CNA and ADP enrichment extracted from CVE v5

These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.

1CVSS vectors
3Timeline events
1ADP providers
4Source links

SSVC decision data

CISA-ADPCISA Coordinator
Timestamp
Version
2.0.3
Exploitation: pocAutomatable: noTechnical Impact: partial

CVSS vector scores

1 official score

We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.

ScoreVersionSeverityVectorExploitImpactSource
8.2CVSS 3.1HighCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:L/A:N2.84.7GitHub_M

Vulnerability scoring details

Base CVSS 3.1 score

8.2High
CVSS 3.1 vector shape for CVE-2026-54690Attack VectorAttack ComplexityPrivileges RequiredUser InteractionScopeConfidentiality ImpactIntegrity ImpactAvailability Impact

Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:L/A:N

Attack Vector
NetworkAdjacentLocalPhysical
Attack Complexity
LowHigh
Privileges Required
NoneLowHigh
User Interaction
NoneRequired
Scope
ChangedUnchanged
Confidentiality Impact
HighLowNone
Integrity Impact
HighLowNone
Availability Impact
HighLowNone

Vulnerability timeline

Timeline events are normalized from CVE metadata, CNA source timelines, ADP timelines, and KEV metadata when present.

  1. CVE reservedCVE Program

    The CVE ID was reserved by the assigning CNA.

  2. CVE publishedCVE Program

    The CVE record was published.

  3. CVE updatedCVE Program

    The CVE record metadata indicates this as the latest update time.

ADP provider summaries

CISA-ADPCISA ADP Vulnrichment
other:ssvc
Affected products

Products and packages named in the record

VendorProductVersion / packageStatus
koxudaxidatamodel-code-generator>= 0.9.1, < 0.61.0Listed
Weakness

CWE details

CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.

CWE-918 · source CWE mapping

Server-Side Request Forgery (SSRF)

Server-Side Request Forgery (SSRF) represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.