IT SBIT Services
Schneeberger
DEEN
CVE tracker

openapi-python-client: Arbitrary Python code generation from malicious OpenAPI documents

CVE-2026-105801High 8.4

← All vulnerabilities

Summary

openapi-python-client generates Python API clients from OpenAPI documents. Before version 0.29.1, the generator does not properly neutralise malicious content from an OpenAPI document when it renders strings, docstrings and f-strings. An attacker who supplies a crafted document can cause the generated client to contain Python code that runs when a user imports the client, which can compromise the integrity of the importing environment and potentially its confidentiality and availability. The risk applies mainly to build pipelines and developer workstations that generate clients from OpenAPI documents they do not control.

Affected

  • openapi-python-client versions before 0.29.1
  • Vendor and CVE record: affected < 0.29.1

Fixed in

  • Fixed in openapi-python-client 0.29.1
  • 0.29.1 requires Python 3.11 or later
  • The release changes the string-escaping helpers, so custom templates must be updated

Workaround

  • Do not generate clients from OpenAPI documents you do not fully trust
  • Carefully review existing clients generated from untrusted documents before importing them
  • Unknown: no other workaround has been published by the vendor

Exploitation

  • CISA SSVC: exploitation none, automatable yes, technical impact total
  • No reports of active exploitation found; no CISA KEV entry found in our searches
  • No public proof of concept found
  • Authentication is not required to supply a malicious document, but a person must import the generated client

Our recommendation

  • Inventory all uses of openapi-python-client, including development dependencies and CI pins, and identify versions below 0.29.1
  • Upgrade to 0.29.1 where Python 3.11 or later is available, and update custom templates
  • Regenerate clients only from trusted OpenAPI documents
  • Review previously generated code from untrusted documents for unexpected executable content before importing it
  • Do not treat a clean dependency scan as proof that the software is not affected

Public exploits

PoC-in-GitHub, Metasploit and Exploit-DB list nothing for this CVE.

Research sources

Researched and written up in English and German by an AI (Claude by Anthropic) based on NVD, CISA, EPSS and the sources listed. The vendor information is authoritative. Researched on 1 Nov 2026, 12:48.

Original description (NVD)

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.

NVD references (4)

Sources

The tracker combines official, freely usable data sources – updated continuously:

This product uses data from the NVD API but is not endorsed or certified by the NVD. EPSS data © FIRST.org.

Affected? We can help.

We check whether your systems are affected, install updates and close the gap – continuously with the System Health Checker if you wish.