CVE-2026-105801 openapi-python-client: Malicious OpenAPI Documents can cause Arbitrary Code Generation

High 8.4 Published Updated

Attackers can inject arbitrary Python code into generated clients via malicious OpenAPI documents, leading to code execution when the client is imported.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Local or same network only
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2026-105801?

CVE-2026-105801 is a high-severity code injection vulnerability in openapi-generators openapi-python-client, published on 6 Oct 2026. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.

Official description

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.

Weakness: CWE-94, CWE-150, CWE-116

Which versions are affected by CVE-2026-105801?

3 open source packages ship an affected version, including openapi-python-client.

PackageAffectedFixed in
openapi-python-client PyPIAll versions0.29.1
openapi-python-client PyPIAll versions0.29.1
openapi-python-client PyPIAll versions0.29.1

How do I fix CVE-2026-105801?

Upgrade openapi-python-client to 0.29.1 or later.

Upgrade, and never evaluate templates, expressions or code built from user input. More about Code injection.

Is CVE-2026-105801 being exploited?

There is no known exploitation of CVE-2026-105801 in the wild and no public exploit code.

Sources

Also known as GHSA-5293-mq8x-g3xj, PYSEC-2026-4245.

Is CVE-2026-105801 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free