CVE-2026-105801

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

State
Published
Severity
8.4 High
Published
Oct 6, 2026
Updated
Oct 9, 2026
Reserved
Oct 5, 2026

Read the record on cve.org

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.

Scores

CVSSScoreVectorSource
4.08.4 HighCVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:N/VI:H/VA:N/SC:H/SI:H/SA:HGitHub_M

Weaknesses

  • CWE-94 Improper Control of Generation of Code ('Code Injection')
  • CWE-116 Improper Encoding or Escaping of Output
  • CWE-150 Improper Neutralization of Escape, Meta, or Control Sequences

Affected Products

ProductVersions
openapi-python-clientopenapi-generators
  • < 0.29.1Affected

References

Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.