{
  "affected": [
    {
      "ranges": [
        {
          "database_specific": {
            "extracted_events": [
              {
                "introduced": "0.51.0"
              },
              {
                "fixed": "0.60.2"
              }
            ],
            "source": "AFFECTED_FIELD"
          },
          "events": [
            {
              "introduced": "74cd08b2ae20730e052ca3c7f9c39c8f5296c0dd"
            },
            {
              "fixed": "e0ea4e45117acd41dcf6ae3a6639cc3f41b59045"
            }
          ],
          "repo": "https://github.com/datamodel-code-generator/datamodel-code-generator",
          "type": "GIT"
        },
        {
          "database_specific": {
            "source": "REFERENCES"
          },
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "2c93c9b712f43391dcfa975a1e4aa0b7c93ccbba"
            },
            {
              "fixed": "e0ea4e45117acd41dcf6ae3a6639cc3f41b59045"
            }
          ],
          "repo": "https://github.com/koxudaxi/datamodel-code-generator",
          "type": "GIT"
        }
      ]
    }
  ],
  "aliases": [
    "GHSA-m34r-v34r-rf9q"
  ],
  "database_specific": {
    "cna_assigner": "GitHub_M",
    "cwe_ids": [
      "CWE-94"
    ],
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/54xxx/CVE-2026-54655.json"
  },
  "details": "datamodel-code-generator generates Python data models from schema definitions. From 0.51.0 until 0.60.2, x-python-type values parsed by src/datamodel_code_generator/parser/jsonschema.py in _get_python_type_override are inserted into generated field annotations without sufficient validation, allowing attacker-controlled JSON Schema content to execute Python code when the generated module is imported. This issue is fixed in version 0.60.2.",
  "id": "CVE-2026-54655",
  "modified": "2026-09-08T11:30:56.356813998Z",
  "published": "2026-07-28T21:33:45.438Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/koxudaxi/datamodel-code-generator/releases/tag/0.60.2"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/54xxx/CVE-2026-54655.json"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/koxudaxi/datamodel-code-generator/security/advisories/GHSA-m34r-v34r-rf9q"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-54655"
    },
    {
      "type": "FIX",
      "url": "https://github.com/koxudaxi/datamodel-code-generator/commit/2c93c9b712f43391dcfa975a1e4aa0b7c93ccbba"
    }
  ],
  "schema_version": "1.9.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H",
      "type": "CVSS_V3"
    }
  ],
  "summary": "`datamodel-code-generator` vulnerable to code execution on import via `x-python-type` JSON-Schema extension in datamodel-code-generator"
}