
Cloud Vulnerability DB
A community-led vulnerabilities database
CVE-2026-55403 is a credential leakage vulnerability in datamodel-code-generator, a Python tool that generates data models from schema definitions. The get_body() function in src/datamodel_code_generator/http.py unconditionally forwards Authorization, Cookie, and Proxy-Authorization headers to redirect targets, even when an HTTP redirect crosses to a different origin (host/port/scheme). All versions up to and including 0.62.0 are affected; the issue was disclosed on June 12, 2026, and published to the GitHub Advisory Database on July 28, 2026. It carries a CVSS v3.1 base score of 3.7 (Low) (Github Advisory).
The root cause is improper credential scoping during manual HTTP redirect handling (CWE-200, CWE-601). In get_body(), the code iterates through redirect hops and re-issues each request with the original headers argument unchanged, with no check that the redirect target shares the same origin. Standard HTTP clients such as requests and httpx strip Authorization headers on cross-origin redirects, but this implementation bypasses that behavior. Exploitation requires an attacker to control or influence a redirect from the trusted schema host — for example, via DNS hijacking, a compromised intermediate server, or an open-redirect-prone schema host — to an attacker-controlled destination that records the forwarded credentials. A self-contained proof-of-concept reproducer is publicly available (Github Advisory).
Successful exploitation results in the disclosure of operator-supplied credentials (Bearer tokens, session cookies, proxy credentials) to an attacker-controlled host. The leaked credentials are scoped to the original trusted schema host and can be replayed by the attacker to impersonate the operator against that host. There is no integrity or availability impact; the confidentiality impact is limited to the specific credentials passed via --http-headers or --url userinfo at the time of schema fetching (Github Advisory).
datamodel-code-generator is invoked with authentication credentials (e.g., --http-headers Authorization:Bearer <token> or credentials embedded in --url) to fetch a remote schema from a trusted host.$ref into a schema that triggers a redirect.datamodel-code-generator against the trusted schema URL. The tool's get_body() function follows the redirect and re-sends the original headers — including Authorization, Cookie, and Proxy-Authorization — to the attacker's server.datamodel-code-generator process to unexpected or unfamiliar hosts following an initial schema fetch request; HTTP requests carrying Authorization or Cookie headers sent to hosts other than the originally configured schema host.Authorization: Bearer ..., Cookie: ..., or Proxy-Authorization: ... headers originating from the schema-fetching host.datamodel-code-generator with --http-headers containing sensitive credentials or --url with embedded userinfo credentials targeting remote schema URLs that issue redirects.Upgrade datamodel-code-generator to version 0.63.0 or later, which strips Authorization, Cookie, and Proxy-Authorization headers when a redirect crosses origins, preserving them only for same-origin redirects. The fix was merged via commit a585c037 and released on June 12, 2026 (Release 0.63.0). As a defense-in-depth measure, operators should avoid passing long-lived or broadly scoped credentials to the tool, apply network-level controls to block unexpected outbound redirects, and ensure schema hosts are not open-redirect-prone. No configuration-based workaround is available for versions prior to 0.63.0 other than avoiding the use of authentication headers when fetching remote schemas (Github Advisory).
The vulnerability was discovered and reported by security researcher Hamza Haroon (thegr1ffyn), who provided a self-contained PoC and coordinated disclosure with the maintainer. The maintainer confirmed the issue through review and regression testing before releasing the fix in version 0.63.0. No significant broader media coverage or notable community debate has been observed beyond the advisory publication (Github Advisory).
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."