{"id":2477,"cve":"CVE-2026-105801","cve_url":"https:\/\/www.cvedetails.com\/cve\/CVE-2026-105801\/","cwe":"CWE-94","cwe_number":94,"cwe_url":"https:\/\/cwe.mitre.org\/data\/definitions\/94","cvss_score":8.4,"published":"2026-10-06","owasp":"A03 Injection","odc":"Build\/Package\/Merge","cdc":"Missing Check","category":"Input Validation and Sanitization","subcategory":"Insecure Parsing or Deserialization","scope":"Remote","impact":"Arbitrary Code Execution","summary":"Unsafe rendering of malicious OpenAPI content leads to code execution on import.","permalink":"https:\/\/netpack.pt\/vaitp\/vulnerability\/CVE-2026-105801\/","description":"openapi-python-client generates Python clients from OpenAPI documents. Prior to 0.29.1, the generator does not safely neutralize malicious OpenAPI document content before rendering string, docstring, and f-string contexts in generated Python. The generated Python client can contain attacker-controlled Python that executes when a user imports the client, affecting the importing environment's integrity and potentially its confidentiality and availability. This issue is fixed in version 0.29.1.","solution":"Upgrade\u202fopenapi\u2011python\u2011client to\u202fv0.29.1\u202for later.","affected_component":"openapi-python-client","fixed_by_upgrading":true,"vulnerable_code":"import os\n\ndef render_client(module_name: str, docstring: str) -> str:\n    # VULNERABLE: unsanitized docstring injected into f-string\n    client_code = f'''\"\"\"\n{docstring}\n\"\"\"\n\nclass {module_name.title()}Client:\n    def __init__(self, base_url: str):\n        self.base_url = base_url\n'''\n    return client_code\n\ndef write_client_file(path: str, module_name: str, docstring: str):\n    code = render_client(module_name, docstring)\n    with open(path, 'w', encoding='utf-8') as f:\n        f.write(code)\n","patched_code":"import os\n\ndef render_client(module_name: str, docstring: str) -> str:\n    # FIX: escape braces to prevent f-string injection\n    safe_doc = docstring.replace('{', '{{').replace('}', '}}')\n    client_code = f'''\"\"\"\n{safe_doc}\n\"\"\"\n\nclass {module_name.title()}Client:\n    def __init__(self, base_url: str):\n        self.base_url = base_url\n'''\n    return client_code\n\ndef write_client_file(path: str, module_name: str, docstring: str):\n    code = render_client(module_name, docstring)\n    with open(path, 'w', encoding='utf-8') as f:\n        f.write(code)\n","payload_needed":true,"payload":null,"payload_status":"model_refused","published_fix":[],"references":null}