Summary
openapi-python-client: Malicious OpenAPI Documents can cause Arbitrary Code Generation
Advisory details
Impact
A 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.
Patches
Versions 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.
Workarounds
Do not generate clients for documents you don't completely trust. Carefully verify any existing generated code from untrusted documents.
References
- https://github.com/advisories/GHSA-5293-mq8x-g3xj
- https://github.com/openapi-generators/openapi-python-client/security/advisories/GHSA-5293-mq8x-g3xj
- https://nvd.nist.gov/vuln/detail/CVE-2026-105801
- https://github.com/openapi-generators/openapi-python-client/pull/1483
- https://github.com/openapi-generators/openapi-python-client/commit/1c99af478892e5bbe6583b92acba431c9dec9186
- https://github.com/openapi-generators/openapi-python-client/releases/tag/v0.29.1
Related vulnerabilities
All Supply chain →- HIGHCVE-2026-61433
PraisonAI: API deploy code generator embeds unescaped YAML fields into Python source
- CRITICALGHSA-jqmf-mx4f-hfr6
Vibe-Trading LLM-callable tools permit command execution, code injection, and SSRF
- CRITICALCVE-2026-62681
Orval: RCE via OpenAPI path -> unescaped request-URL template literal (backtick breakout)
- CRITICALCVE-2026-62682
Orval: RCE via servers[].url -> unescaped request-URL template literal (with getBaseUrlFromSpecification)
- CRITICALCVE-2026-72717
Orval: Import-time RCE via schema default -> zod module-level template literal
- CRITICALCVE-2026-71869
Orval: Import-time RCE via array-items default -> zod module-level template literal