<?xml version='1.0' encoding='UTF-8'?>
<?xml-stylesheet href="/static/style.xsl" type="text/xsl"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
  <id>https://vulnerability.circl.lu/rss/recent/all/10</id>
  <title>Most recent entries from all</title>
  <updated>2026-10-06T23:30:59.250203+00:00</updated>
  <author>
    <name>Vulnerability-Lookup</name>
    <email>info@circl.lu</email>
  </author>
  <link href="https://vulnerability.circl.lu" rel="alternate"/>
  <generator uri="https://lkiesow.github.io/python-feedgen" version="1.0.0">python-feedgen</generator>
  <subtitle>Contains only the most 10 recent entries.</subtitle>
  <entry>
    <id>https://vulnerability.circl.lu/vuln/cve-2026-54655</id>
    <title>CVE-2026-54655 — `datamodel-code-generator` vulnerable to code execution on import via `x-python-type` JSON-Schema extension in datamode…</title>
    <updated>2026-10-06T23:30:59.252735+00:00</updated>
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml"><p><strong>Affected:</strong> koxudaxi datamodel-code-generator</p>
<p>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.</p></div>
    </content>
    <link href="https://vulnerability.circl.lu/vuln/cve-2026-54655"/>
  </entry>
  <entry>
    <id>https://vulnerability.circl.lu/vuln/pysec-2026-3562</id>
    <title>PYSEC-2026-3562 — `datamodel-code-generator` vulnerable to code execution on import via `x-python-type` JSON-Schema extension in datamode…</title>
    <updated>2026-10-06T23:30:59.252858+00:00</updated>
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml"><p><strong>Affected:</strong> PyPI: datamodel-code-generator</p>
<p>### Summary
`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.</p>
<p>### Details
Sink: `src/datamodel_code_generator/parser/jsonschema.py`, `_get_python_type_override` (lines 2055–2096, at tag `0.60.1` / commit `a321547e`):</p>
<p>```python
def _get_python_type_override(self, obj: JsonSchemaObject) -&gt; DataType | None:
    x_python_type = obj.extras.get("x-python-type")
    if not x_python_type or not isinstance(x_python_type, str):
        return None
    schema_type = obj.type if isinstance(obj.type, str) else None
    if self._is_compatible_python_type(schema_type, x_python_type):
        return None
    base_type = self._get_python_type_base(x_python_type)
    import_ = self._resolve_type_import(base_type)
    type_str = x_python_type
    prefix = x_python_type.split("[", maxsplit=1)[0]
    if "." in prefix:                                  # only sanitiser
        type_str = base_type + x_python_t…</p></div>
    </content>
    <link href="https://vulnerability.circl.lu/vuln/pysec-2026-3562"/>
  </entry>
</feed>
