{"id":"CVE-2026-105801","aliases":["CVE-2026-105801","GHSA-5293-mq8x-g3xj","PYSEC-2026-4245"],"related":[],"kind":"vulnerability","state":"published","title":"openapi-python-client: Malicious OpenAPI Documents can cause Arbitrary Code Generation","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"### Impact\nA malicious OpenAPI document processed by any `openapi-python-client` prior to 0.29.1 can generate arbitrary Python code. When anyone imports the malicious client, that arbitrary Python code will execute.\n\n### Patches\nVersions starting with 0.29.1 have updated with guardrails to prevent arbitrary code generation. Upgrade to this version immediately and audit any code previously generated from untrusted documents.\n\n### Workarounds\nDo not generate clients for documents you don't completely trust. Carefully verify any existing generated code from untrusted documents.","format":"markdown","source":"ghsa"}],"published":"2026-10-06T14:53:42.461Z","modified":"2026-10-15T14:55:35.768Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:N/VI:H/VA:N/SC:H/SI:H/SA:H","score":8.4,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:N/VI:H/VA:N/SC:H/SI:H/SA:H","score":8.4,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:N/VI:H/VA:N/SC:H/SI:H/SA:H","rating":"HIGH"},{"scorer":"PyPA Advisory Database","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:N/VI:H/VA:N/SC:H/SI:H/SA:H"}],"cwes":["CWE-94","CWE-116","CWE-150"],"affected":[{"ranges":[{"version":"< 0.29.1","status":"affected"}],"vendor":"openapi-generators","product":"openapi-python-client","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"0.29.1"}],"ecosystem":"PyPI","package":"openapi-python-client","purl":"pkg:pypi/openapi-python-client","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"0.29.1"}],"ecosystem":"PyPI","package":"openapi-python-client","purl":"pkg:pypi/openapi-python-client","source":"pysec"}],"references":[{"url":"https://github.com/openapi-generators/openapi-python-client/security/advisories/GHSA-5293-mq8x-g3xj","tags":["web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/openapi-generators/openapi-python-client/pull/1483","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/openapi-generators/openapi-python-client/commit/1c99af478892e5bbe6583b92acba431c9dec9186","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/openapi-generators/openapi-python-client/releases/tag/v0.29.1","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-105801","tags":["advisory"],"sources":["ghsa","pysec"]},{"url":"https://github.com/openapi-generators/openapi-python-client","tags":["package"],"sources":["ghsa","pysec"]},{"url":"https://pypi.org/project/openapi-python-client","tags":["package"],"sources":["pysec"]},{"url":"https://github.com/advisories/GHSA-5293-mq8x-g3xj","tags":["advisory"],"sources":["pysec"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"yes","technicalImpact":"total","date":"2026-10-09T01:06:05.721Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-105801","url":"https://www.cve.org/CVERecord?id=CVE-2026-105801","licence":"CVE Terms of Use","modified":"2026-10-09T01:06:15.915Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-5293-mq8x-g3xj","url":"https://github.com/advisories/GHSA-5293-mq8x-g3xj","licence":"CC-BY-4.0","modified":"2026-10-15T14:55:35.768Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-105801","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-105801","licence":"Public domain","modified":"2026-10-09T02:16:55.107Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2026-4245","url":"https://osv.dev/vulnerability/PYSEC-2026-4245","licence":"CC-BY-4.0","modified":"2026-10-15T14:45:12.938Z"}],"updatedAt":"2026-11-25T22:59:42.361Z","epss":{"score":0.00139,"percentile":0.03446,"date":"2026-12-01T12:00:22.000Z"}}