{
  "affected": [
    {
      "ranges": [
        {
          "database_specific": {
            "extracted_events": [
              {
                "range": [
                  {
                    "introduced": "0"
                  },
                  {
                    "fixed": "0.84.0"
                  }
                ],
                "source": "AFFECTED_FIELD",
                "strategy": "StandardRange"
              },
              {
                "original_tag": "0.84.0",
                "range": [
                  {
                    "fixed": "213ff2c4ab65839d09ea76b93ea446f404a8e5b3"
                  }
                ],
                "source": "REFERENCES_TAG"
              },
              {
                "range": [
                  {
                    "fixed": "ebfc11d0644d37a71374b28aac06d98748e584ec"
                  }
                ],
                "source": "REFERENCES_COMMIT"
              }
            ]
          },
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "213ff2c4ab65839d09ea76b93ea446f404a8e5b3"
            },
            {
              "fixed": "ebfc11d0644d37a71374b28aac06d98748e584ec"
            }
          ],
          "repo": "https://github.com/datamodel-code-generator/datamodel-code-generator",
          "type": "GIT"
        }
      ]
    }
  ],
  "database_specific": {
    "cna_assigner": "VulnCheck",
    "cwe_ids": [
      "CWE-94"
    ],
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/127xxx/CVE-2026-127208.json"
  },
  "details": "datamodel-code-generator before 0.84.0 contains a code injection vulnerability that allows attackers to achieve arbitrary code execution by supplying a malicious JSON Schema with a crafted x-python-type annotation containing a string ast.Constant node in a subscript slice position, which bypasses validation in parse_python_type_annotation and _python_type_expr_from_ast. Attackers can embed malicious Python expressions such as __import__ calls within quoted string literals in the generated source code, which Pydantic v2 evaluates as a ForwardRef via eval() during model_rebuild(), resulting in arbitrary code execution on developer workstations, CI/CD pipelines, or applications that generate and import the produced models at runtime.",
  "id": "CVE-2026-127208",
  "modified": "2026-11-15T02:30:58.816167669Z",
  "published": "2026-11-12T20:58:59.634Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/127xxx/CVE-2026-127208.json"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/datamodel-code-generator/datamodel-code-generator/releases/tag/0.84.0"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-127208"
    },
    {
      "type": "ADVISORY",
      "url": "https://www.vulncheck.com/advisories/datamodel-code-generator-code-injection-via-x-python-type-annotation"
    },
    {
      "type": "FIX",
      "url": "https://github.com/datamodel-code-generator/datamodel-code-generator/commit/ebfc11d0644d37a71374b28aac06d98748e584ec"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/datamodel-code-generator/datamodel-code-generator"
    }
  ],
  "schema_version": "1.9.2",
  "severity": [
    {
      "score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N",
      "type": "CVSS_V4"
    }
  ],
  "summary": "datamodel-code-generator \u003c 0.84.0 Code Injection via x-python-type Annotation"
}