{"items":[{"id":"NVI-00016384","kind":"vulnerability","title":"`datamodel-code-generator` vulnerable to code execution on import via `x-python-type` JSON-Schema extension in datamodel-code-generator","revision":2,"unknowns":["Customer inventory, deployment, reachability and exploitation have not been inspected.","NVD lastModified does not establish freshness of every associated CPE record."],"lifecycle":"active","identifiers":["GHSA-m34r-v34r-rf9q","CVE-2026-54655"],"plain_summary":"GitHub lists this reviewed advisory for datamodel-code-generator. Published version ranges and source prerequisites are shown below; this is not an inspection of a visitor’s application.","review_status":"source_listed","control_topics":[],"public_actions":[{"summary":"Identify the exact component and deployed version, examine the linked publisher’s conditions, and retain evidence of any mitigation.","source_ids":["sr-03026e0704b83f292336d3017ebc4a4d"],"action_type":"investigate","limitations":"Confirm current vendor support, compatibility and deployment evidence. This report has not tested a fix in your system.","current_supported_target":null}],"schema_version":"1.1.0","source_metrics":[{"kind":"CVSS","as_of":"2026-07-28T21:34:00.000Z","value":"7.8 high","meaning":"GitHub source severity; exploitability and local consequence require separate evidence.","source_id":"sr-6ca79eca8ef6a36a418ea776d7c3ced8"},{"kind":"CVSS","as_of":"2026-10-23T23:10:00.157Z","value":"7.8 HIGH (3.1)","meaning":"security-advisories@github.com severity; no combined Null risk score.","source_id":"sr-03026e0704b83f292336d3017ebc4a4d"}],"why_it_matters":"Published affected context helps an owner decide what evidence to gather. This report has not examined your application.","related_sources":[{"id":"sr-6ca79eca8ef6a36a418ea776d7c3ced8","url":"https://github.com/advisories/GHSA-m34r-v34r-rf9q","basis":"vendor_advisory","notes":"GitHub Advisory Database; CC-BY-4.0. Each advisory links its original attribution. Null normalizes fields.","title":"GHSA-m34r-v34r-rf9q","publisher":"GitHub Advisory Database","observed_at":"2026-11-03T09:59:04.660Z"},{"id":"sr-03026e0704b83f292336d3017ebc4a4d","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-54655","basis":"official_catalog","notes":"This product uses data from the NVD API but is not endorsed or certified by the NVD.","title":"CVE-2026-54655","publisher":"NIST National Vulnerability Database","observed_at":"2026-11-08T01:48:19.229Z"}],"affected_context":[{"certainty":"source_listed","source_ids":["sr-6ca79eca8ef6a36a418ea776d7c3ced8"],"technology":"datamodel-code-generator","known_exclusions":[],"conditions_summary":"### Summary\n`datamodel-code-generator` honours a custom `x-python-type` JSON-Schema extension that lets a schema author override the generated Python type for a field. The value is forwarded verbatim into the generated Python source as the field annotation, with a single sanitisation pass that is trivial to bypass. An attacker who controls a JSON Schema fed to `datamodel-codegen` can therefore embed an arbitrary Python statement in the generated module, which executes at class-definition time the moment the developer imports the file. No `--extra-template-data` and no special flags are required; the vulnerable code is reachable with default settings.\n\n### Details\nSink: `src/datamodel_code_generator/parser/jsonschema.py`, `_get_python_type_override` (lines 2055–2096, at tag `0.60.1` / commit `a321547e`):\n\n```python\ndef _get_python_type_override(self, obj: JsonSchemaObject) -> DataType | None:\n    x_python_type = obj.extras.get(\"x-python-type\")\n    if not x_python_type or not isinstance(x_python_type, str):\n        return None\n    schema_type = obj.type if isinstance(obj.type, str) else None\n    if self._is_compatible_python_type(schema_type, x_python_type):\n        return None\n    b","public_affected_ranges":[">= 0.51.0, <= 0.60.1"]}],"null_published_at":"2026-11-08T19:53:44.016Z","source_updated_at":"2026-07-28T21:34:00.000Z","source_disclosed_at":"2026-07-28T21:33:57.000Z","is_synthetic_fixture":false,"null_last_reviewed_at":null,"public_change_summary":"Source facts changed; compare the preserved prior revision.","null_first_observed_at":"2026-11-03T09:59:04.660Z"},{"id":"NVI-00016384","kind":"vulnerability","title":"`datamodel-code-generator` vulnerable to code execution on import via `x-python-type` JSON-Schema extension in datamodel-code-generator","revision":1,"unknowns":["Customer inventory, deployment, reachability and exploitation have not been inspected."],"lifecycle":"active","identifiers":["GHSA-m34r-v34r-rf9q","CVE-2026-54655"],"plain_summary":"GitHub lists this reviewed advisory for datamodel-code-generator. Published version ranges and source prerequisites are shown below; this is not an inspection of a visitor’s application.","review_status":"source_listed","control_topics":[],"public_actions":[{"summary":"Identify the exact component and deployed version, examine the linked publisher’s conditions, and retain evidence of any mitigation.","source_ids":["sr-6ca79eca8ef6a36a418ea776d7c3ced8"],"action_type":"investigate","limitations":"Confirm current vendor support, compatibility and deployment evidence. This report has not tested a fix in your system.","current_supported_target":null}],"schema_version":"1.1.0","source_metrics":[{"kind":"CVSS","as_of":"2026-07-28T21:34:00.000Z","value":"7.8 high","meaning":"GitHub source severity; exploitability and local consequence require separate evidence.","source_id":"sr-6ca79eca8ef6a36a418ea776d7c3ced8"}],"why_it_matters":"Published affected context helps an owner decide what evidence to gather. This report has not examined your application.","related_sources":[{"id":"sr-6ca79eca8ef6a36a418ea776d7c3ced8","url":"https://github.com/advisories/GHSA-m34r-v34r-rf9q","basis":"vendor_advisory","notes":"GitHub Advisory Database; CC-BY-4.0. Each advisory links its original attribution. Null normalizes fields.","title":"GHSA-m34r-v34r-rf9q","publisher":"GitHub Advisory Database","observed_at":"2026-11-03T09:59:04.660Z"}],"affected_context":[{"certainty":"source_listed","source_ids":["sr-6ca79eca8ef6a36a418ea776d7c3ced8"],"technology":"datamodel-code-generator","known_exclusions":[],"conditions_summary":"### Summary\n`datamodel-code-generator` honours a custom `x-python-type` JSON-Schema extension that lets a schema author override the generated Python type for a field. The value is forwarded verbatim into the generated Python source as the field annotation, with a single sanitisation pass that is trivial to bypass. An attacker who controls a JSON Schema fed to `datamodel-codegen` can therefore embed an arbitrary Python statement in the generated module, which executes at class-definition time the moment the developer imports the file. No `--extra-template-data` and no special flags are required; the vulnerable code is reachable with default settings.\n\n### Details\nSink: `src/datamodel_code_generator/parser/jsonschema.py`, `_get_python_type_override` (lines 2055–2096, at tag `0.60.1` / commit `a321547e`):\n\n```python\ndef _get_python_type_override(self, obj: JsonSchemaObject) -> DataType | None:\n    x_python_type = obj.extras.get(\"x-python-type\")\n    if not x_python_type or not isinstance(x_python_type, str):\n        return None\n    schema_type = obj.type if isinstance(obj.type, str) else None\n    if self._is_compatible_python_type(schema_type, x_python_type):\n        return None\n    b","public_affected_ranges":[">= 0.51.0, <= 0.60.1"]}],"null_published_at":"2026-11-04T10:04:27.938Z","source_updated_at":"2026-07-28T21:34:00.000Z","source_disclosed_at":"2026-07-28T21:33:57.000Z","is_synthetic_fixture":false,"null_last_reviewed_at":null,"public_change_summary":"First indexed by Null; source disclosure date is shown separately.","null_first_observed_at":"2026-11-03T09:59:04.660Z"}],"next_cursor":null,"snapshot_revision":"42594"}