← Back to CVE Explorer

CVE-2026-54691

Full vulnerability record from the local CVENow database.

Description

datamodel-code-generator generates Python data models from schema definitions. From 0.9.1 until 0.61.0, src/datamodel_code_generator/http.py http.get_body accepts --url targets and redirect chain targets without host/IP validation, allowing server-side request forgery against loopback, private, link-local, metadata, and other network-accessible resources. This issue is fixed in version 0.61.0.

Severity
HIGH
CVSS score
8.2 (v3.1)
Vulnerability status
Deferred
Source identifier
Published
2026-07-28 22:17:40.800000
Last modified
2026-10-23 23:10:00.157000
View original CVE JSON
{
  "id": "CVE-2026-54691",
  "sourceIdentifier": "[email protected]",
  "published": "2026-07-28T22:17:40.800",
  "lastModified": "2026-10-23T23:10:00.157",
  "vulnStatus": "Deferred",
  "cveTags": [],
  "descriptions": [
    {
      "lang": "en",
      "value": "datamodel-code-generator generates Python data models from schema definitions. From 0.9.1 until 0.61.0, src/datamodel_code_generator/http.py http.get_body accepts --url targets and redirect chain targets without host/IP validation, allowing server-side request forgery against loopback, private, link-local, metadata, and other network-accessible resources. This issue is fixed in version 0.61.0."
    },
    {
      "lang": "es",
      "value": "datamodel-code-generator genera modelos de datos Python a partir de definiciones de esquema. Desde la versión 0.9.1 hasta la 0.61.0, src/datamodel_code_generator/http.py http.get_body acepta objetivos --url y objetivos de cadena de redirección sin validación de host/IP, lo que permite la falsificación de petición del lado del servidor contra recursos de loopback, privados, de enlace local, de metadatos y otros recursos accesibles por red. Este problema está solucionado en la versión 0.61.0."
    }
  ],
  "affected": [
    {
      "source": "[email protected]",
      "affectedData": [
        {
          "vendor": "koxudaxi",
          "product": "datamodel-code-generator",
          "versions": [
            {
              "version": ">= 0.9.1, < 0.61.0",
              "status": "affected"
            }
          ]
        }
      ]
    }
  ],
  "metrics": {
    "cvssMetricV31": [
      {
        "source": "[email protected]",
        "type": "Secondary",
        "cvssData": {
          "version": "3.1",
          "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:L/A:N",
          "baseScore": 8.2,
          "baseSeverity": "HIGH",
          "attackVector": "NETWORK",
          "attackComplexity": "LOW",
          "privilegesRequired": "NONE",
          "userInteraction": "REQUIRED",
          "scope": "CHANGED",
          "confidentialityImpact": "HIGH",
          "integrityImpact": "LOW",
          "availabilityImpact": "NONE"
        },
        "exploitabilityScore": 2.8,
        "impactScore": 4.7
      }
    ],
    "ssvcV203": [
      {
        "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
        "ssvcData": {
          "timestamp": "2026-07-29T14:18:17.626661Z",
          "id": "CVE-2026-54691",
          "options": [
            {
              "exploitation": "poc"
            },
            {
              "automatable": "no"
            },
            {
              "technicalImpact": "partial"
            }
          ],
          "role": "CISA Coordinator",
          "version": "2.0.3"
        }
      }
    ]
  },
  "weaknesses": [
    {
      "source": "[email protected]",
      "type": "Secondary",
      "description": [
        {
          "lang": "en",
          "value": "CWE-918"
        }
      ]
    }
  ],
  "references": [
    {
      "url": "https://github.com/koxudaxi/datamodel-code-generator/commit/5fdba4a09f2d7a9996a504975b7ef7d63e3715bb",
      "source": "[email protected]"
    },
    {
      "url": "https://github.com/koxudaxi/datamodel-code-generator/releases/tag/0.61.0",
      "source": "[email protected]"
    },
    {
      "url": "https://github.com/koxudaxi/datamodel-code-generator/security/advisories/GHSA-rfr2-mq9m-x2qx",
      "source": "[email protected]"
    },
    {
      "url": "https://github.com/koxudaxi/datamodel-code-generator/security/advisories/GHSA-rfr2-mq9m-x2qx",
      "source": "134c704f-9b21-4f2e-91b3-4a467353bcc0"
    }
  ]
}