CVE-2026-105801
JSON

8.4high

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

Severity
8.4high CVSS:4.0 by GitHub_M
Exploit likelihood
0.14% (higher than 3% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-5293-mq8x-g3xjPYSEC-2026-4245

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.

Affected

Product or packageVersionsReported by
openapi-generators openapi-python-client< 0.29.1CVE List
openapi-python-client (PyPI)before 0.29.1GitHub Advisory Database, PyPA Advisory Database

All scores

GitHub_M8.4high CVSS:4.0CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:N/VI:H/VA:N/SC:H/SI:H/SA:H
GitHubhigh CVSS:4.0CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:N/VI:H/VA:N/SC:H/SI:H/SA:H
PyPA Advisory DatabaseNot scored CVSS:4.0CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:N/VI:H/VA:N/SC:H/SI:H/SA:H

Classification

CWE-94CWE-116CWE-150

SSVC (CISA-ADP): exploitation none, automatable yes, technical impact total.

What each source says

CVE List

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.

GitHub Advisory Database
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

Sources

SourceRecordLicence
CVE ListCVE-2026-105801 changed 2026-10-09CVE Terms of Use
GitHub Advisory DatabaseGHSA-5293-mq8x-g3xj changed 2026-10-15CC-BY-4.0
NVDCVE-2026-105801 changed 2026-10-09Public domain
PyPA Advisory DatabasePYSEC-2026-4245 changed 2026-10-15CC-BY-4.0