CVE-2026-105801: openapi-python-client: Malicious OpenAPI Documents can cause Arbitrary Code Generation
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.
Published Oct 6, 2026
Affected packages
openapi-python-client
- Ecosystem
- PyPI
- Affected
- < 0.29.1
- Fixed in
- 0.29.1
- Check
pip show openapi-python-client
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
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.
Credited to Gal3m, iabdullah215, 0xsharz.
References
- 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
- https://github.com/advisories/GHSA-5293-mq8x-g3xj
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
