{
  "id": "CVE-2026-63720",
  "url": "https://poc.griffinguard.io/cve/CVE-2026-63720",
  "published_at": "2026-07-26T03:51:18.553Z",
  "title": "datamodel-code-generator Code Injection via Unvalidated customBasePath Schema Field",
  "vendor": "koxudaxi",
  "product": "datamodel-code-generator",
  "cvss": {
    "score": 7.5,
    "source": "cna",
    "vector": "CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N"
  },
  "kev": {
    "in_kev": false,
    "added_at": null,
    "days_after_publication": null
  },
  "first_poc": {
    "created_at": "2026-08-03T10:36:03Z",
    "first_seen_at": "2026-11-14T11:25:11.578Z",
    "days_after_publication": 8.3,
    "repo": "rahulreddykarne/CVE-2026-63720-datamodel-code-generator",
    "source": "github"
  },
  "poc_repo_count": 1,
  "exploit_count": 0,
  "suspicious_repo_count": 0,
  "edge_device": null,
  "description": "datamodel-code-generator prior to version 0.70.0 contains a code injection vulnerability that allows attackers who control input schemas to achieve remote code execution by supplying a malicious customBasePath value containing embedded newlines and a dot-free Python expression. The crafted value is emitted verbatim into a generated 'from ... import ...' statement without identifier validation, causing arbitrary Python code to execute when the generated module is imported.",
  "cwe": "CWE-94",
  "cvss_by_source": {
    "cna": 7.5
  },
  "repos": [
    {
      "repo": "rahulreddykarne/CVE-2026-63720-datamodel-code-generator",
      "url": "https://github.com/rahulreddykarne/CVE-2026-63720-datamodel-code-generator",
      "created_at": "2026-08-03T10:36:03Z",
      "first_seen_at": "2026-11-14T11:25:11.578Z",
      "stars": 0,
      "is_poc": "yes",
      "kind": "exploit",
      "suspicion_score": 15,
      "suspicious": false,
      "suspicion_reasons": [
        "no network code found (normal for a local exploit)"
      ],
      "status": "analyzed",
      "owner_created_at": "2017-11-09T20:34:00Z"
    }
  ],
  "remediation": {
    "affected": [
      {
        "vendor": "koxudaxi",
        "product": "datamodel-code-generator",
        "ranges": [
          "\u003c 0.70.0"
        ],
        "fixed_in": [
          "0.70.0"
        ]
      }
    ],
    "upgrade": [
      "Upgrade datamodel-code-generator to 0.70.0 or later."
    ],
    "references": [
      {
        "kind": "Patch",
        "url": "https://github.com/koxudaxi/datamodel-code-generator/commit/545a96c5"
      }
    ]
  },
  "exploit_refs": [
    {
      "url": "https://rahulkarne.com/#/cve/CVE-2026-63720",
      "source": "cvelist",
      "title": "Blog Post",
      "published_at": null,
      "first_seen_at": "2026-11-14T10:26:36.149Z"
    }
  ],
  "hunt_profile": [
    {
      "method": "POST",
      "path_template": "/generate",
      "body_markers": [
        "\"customBasePath\":",
        "getattr(__import__('os'),'system')",
        "\"type\": \"object\"",
        "builtins import object",
        "from builtins.object"
      ],
      "ports": [
        8000
      ],
      "protocol": "http",
      "repos": [
        "rahulreddykarne/CVE-2026-63720-datamodel-code-generator"
      ],
      "repo_count": 1,
      "confidence": 0.6,
      "evidence": [
        "rahulreddykarne/CVE-2026-63720-datamodel-code-generator/server/victim_service.py:8",
        "rahulreddykarne/CVE-2026-63720-datamodel-code-generator/README.md:166",
        "rahulreddykarne/CVE-2026-63720-datamodel-code-generator/README.md:207"
      ]
    }
  ],
  "rules": []
}
