# GHSA-5293-MQ8X-G3XJ: openapi-python-client: Malicious OpenAPI Documents can cause Arbitrary Code Generation

- Database: GitHub
- Severity: high (stated by ghsa, no CVSS score)
- Published: 2026-10-06
- Modified: 2026-10-15

## Tracked as

- [CVE-2026-105801](https://cve.now/CVE-2026-105801.md): openapi-python-client: Malicious OpenAPI Documents can cause Arbitrary Code Generation

## Also published as

- [PYSEC-2026-4245](https://cve.now/PYSEC-2026-4245.md) (PyPA)

## Affected versions

- openapi-python-client (PyPI): fixed in 0.29.1

## Description

### 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/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
- https://github.com/openapi-generators/openapi-python-client/releases/tag/v0.29.1

Page: https://cve.now/GHSA-5293-MQ8X-G3XJ

Wrong or missing data? Send feedback: POST https://cve.now/api/v1/feedback (see https://cve.now/agents#feedback).
