Advisory Database
  • Advisories
  • Dependency Scanning
  1. pypi
  2. ›
  3. datamodel-code-generator
  4. ›
  5. CVE-2026-55391

CVE-2026-55391: datamodel-code-generator vulnerable to SSRF protection bypass via DNS rebinding

July 28, 2026

datamodel-code-generator’s anti-SSRF guard validates the resolved IP of a fetch target once and then lets httpx perform its own independent DNS resolution to connect, so the validated address is never pinned. A hostname that resolves to a public IP at validation time and a private IP at connection time (DNS rebinding) bypasses the guard and reaches loopback, link-local cloud-metadata endpoints (169.254.169.254), and other internal services — even with the default allow_private_network=False. This is a server-side request forgery reachable when the tool fetches an attacker-influenced URL (remote $ref, or --url).

References

  • github.com/advisories/GHSA-vx7x-vcc2-c44g
  • github.com/koxudaxi/datamodel-code-generator/commit/25c8b7e497419eb20b230fa3318c04f9bebc5a6f
  • github.com/koxudaxi/datamodel-code-generator/releases/tag/0.63.0
  • github.com/koxudaxi/datamodel-code-generator/security/advisories/GHSA-vx7x-vcc2-c44g
  • nvd.nist.gov/vuln/detail/CVE-2026-55391

Code Behaviors & Features

Detect and mitigate CVE-2026-55391 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 0.63.0

Fixed versions

  • 0.63.0

Solution

Upgrade to version 0.63.0 or above.

Impact 7.5 HIGH

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

Learn more about CVSS

Weakness

  • CWE-350: Reliance on Reverse DNS Resolution for a Security-Critical Action
  • CWE-367: Time-of-check Time-of-use (TOCTOU) Race Condition
  • CWE-918: Server-Side Request Forgery (SSRF)

Source file

pypi/datamodel-code-generator/CVE-2026-55391.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sat, 08 Aug 2026 00:18:10 +0000.