# CVE-2026-105801: openapi-python-client code injection in generated client

Source: https://junglewise.ai/threats/cve-2026-105801-openapi-python-client-generates-python-clients-from-openapi  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-10-06. Updated: 2026-10-06  
License: CC BY 4.0 with a link back

CVE-2026-105801 · Severity: high · CVSS 4 · Published 2026-10-06

openapi-python-client is a tool that generates Python client libraries from OpenAPI documents. A vulnerability allows attackers to embed malicious Python code in an OpenAPI document that gets embedded into the generated client code. When users import and use the generated client, this injected code executes automatically, potentially compromising the importing application's security.

Technologies: [openapi-python-client (PyPI)](https://junglewise.ai/threats/technologies/openapi-python-client). Vendors: [PyPI](https://junglewise.ai/threats/vendors/pypi).

## Quick answers

**Is CVE-2026-105801 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-105801 being exploited in the wild.

**How severe is CVE-2026-105801?** High severity, with a CVSS score of 4, published 6 October 2026.

**Which products and versions are affected?** Openapi-Generators Openapi-Python-Client before 0.29.1; openapi-python-client (PyPI) < 0.29.1, ECOSYSTEM:introduced=0,fixed=0.29.1.

**Is there a fix for CVE-2026-105801?** Yes. openapi-python-client (PyPI): upgrade to 0.29.1 or later. Until then: If generating code from OpenAPI documents you do not control, validate and audit any previously-generated client code for injected malicious content before using it.</anigation>
</invoke> Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-105801 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-105801?** Check whether you run Openapi-Generators Openapi-Python-Client or openapi-python-client (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- openapi-python-client (PyPI): upgrade to 0.29.1 or later

  ```sh
  pip install "openapi-python-client>=0.29.1"
  ```


If generating code from OpenAPI documents you do not control, validate and audit any previously-generated client code for injected malicious content before using it.</anigation>
</invoke>

## Technical details

The generator fails to safely escape or neutralize attacker-controlled content from OpenAPI documents before inserting it into Python string literals, docstrings, and f-strings in generated code. This allows code injection that executes upon client import. The vulnerability is addressed in version 0.29.1 through a comprehensive rewrite of string handling to properly escape document content.

## Affected products

- openapi-generators openapi-python-client before 0.29.1

## Identifiers

- CVE-2026-105801
- GHSA-5293-mq8x-g3xj
- PYSEC-2026-4245

## Timeline

- 2026-10-06: disclosed
- 2026-08-30: patched

## References

- [https://github.com/openapi-generators/openapi-python-client/commit/1c99af478892e5bbe6583b92acba431c9dec9186](https://github.com/openapi-generators/openapi-python-client/commit/1c99af478892e5bbe6583b92acba431c9dec9186)
- [https://github.com/openapi-generators/openapi-python-client/pull/1483](https://github.com/openapi-generators/openapi-python-client/pull/1483)

## Related threats

- [openapi-python-client Arbitrary Code Generation vulnerability](https://junglewise.ai/threats/cve-2020-15142-openapi-python-client-arbitrary-code-generation-vulnerability)
- [Path Traversal in openapi-python-client](https://junglewise.ai/threats/cve-2020-15141-path-traversal-in-openapi-python-client)
