Description
datamodel-code-generator generates Python data models from schema definitions. Prior to 0.63.0, src/datamodel_code_generator/http.py get_body reuses Authorization, Cookie, and Proxy-Authorization headers when following cross-origin redirects while fetching remote schemas, allowing credentials scoped to one schema host to be leaked to another redirect target. This issue is fixed in version 0.63.0.
Published: 2026-07-28
Score: 3.7 Low
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

datamodel-code-generator constructs Python data models by retrieving schema definitions from remote locations. Until version 0.63.0 the utility re‑used the Authorization, Cookie, and Proxy-Authorization headers when following cross‑origin redirects while fetching these schemas. This behaviour exposes credentials that were scoped to the original schema host to an attacker who controls the redirect target, resulting in sensitive credential disclosure. The weakness manifests as a leakage of authentication information and is mapped to CWE‑200 and CWE‑601. The vulnerability is an information‑exposure issue; no privilege escalation or code execution is required beyond the ability to run the tool and point it at a remote schema. The CVSS base score of 3.7 reflects a low‑severity disclosure scenario, and an EPSS score of <1 % indicates a very low likelihood of exploitation. The issue is not on the CISA KEV list. Attackers would need to supply a remote schema that redirects to a host where they can capture the forwarded credentials and must have the tool execute in an environment that can reach the target.

Affected Systems

The affected vendor is koxudaxi and its datamodel‑code‑generator package. All releases prior to version 0.63.0 contain the flaw; users of 0.62.x and earlier should check the version they are using and upgrade to 0.63.0 or later.

Risk and Exploitability

The CVSS score of 3.7 denotes low exposure risk, and the EPSS score of <1 % shows that real‑world exploitation is unlikely at this time. Although the issue is not listed in CISA KEV, it could still be abused by an attacker who controls the redirect target of a schema; such an attacker would need the tool to be running in an environment that can reach malicious hosts, so local access or compromised automation is required.

Generated by OpenCVE AI on August 3, 2026 at 14:12 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade datamodel-code-generator to version 0.63.0 or later, where the header propagation bug is fixed.
  • If an immediate upgrade is not possible, run the tool only against trusted schema sources, or run it in an isolated environment without sensitive headers; as a temporary patch, modify http.py to clear Authorization, Cookie, and Proxy‑Authorization headers after a redirect.
  • Configure network controls or firewall rules to prevent the tool from contacting untrusted redirect targets during schema retrieval.

Generated by OpenCVE AI on August 3, 2026 at 14:12 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-r5vv-ff45-prp2 datamodel-code-generator: Authorization / request headers leaked to cross-origin redirect target when fetching remote schemas
History

Wed, 29 Jul 2026 13:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Tue, 28 Jul 2026 23:45:00 +0000

Type Values Removed Values Added
First Time appeared Koxudaxi
Koxudaxi datamodel-code-generator
Vendors & Products Koxudaxi
Koxudaxi datamodel-code-generator

Tue, 28 Jul 2026 22:00:00 +0000

Type Values Removed Values Added
Description datamodel-code-generator generates Python data models from schema definitions. Prior to 0.63.0, src/datamodel_code_generator/http.py get_body reuses Authorization, Cookie, and Proxy-Authorization headers when following cross-origin redirects while fetching remote schemas, allowing credentials scoped to one schema host to be leaked to another redirect target. This issue is fixed in version 0.63.0.
Title datamodel-code-generator: Authorization / request headers leaked to cross-origin redirect target when fetching remote schemas
Weaknesses CWE-200
CWE-601
References
Metrics cvssV3_1

{'score': 3.7, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N'}


Subscriptions

Koxudaxi Datamodel-code-generator
cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-07-29T12:46:11.346Z

Reserved: 2026-06-16T21:48:43.124Z

Link: CVE-2026-55403

cve-icon Vulnrichment

Updated: 2026-07-29T12:46:07.971Z

cve-icon NVD

Status : Deferred

Published: 2026-07-28T22:17:48.840

Modified: 2026-07-30T20:02:12.943

Link: CVE-2026-55403

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-03T14:15:05Z

Weaknesses
  • CWE-200

    Exposure of Sensitive Information to an Unauthorized Actor

  • CWE-601

    URL Redirection to Untrusted Site ('Open Redirect')