Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessCraft malicious OpenAPI document
-
DeliveryVictim generates Python client (<0.29.1)
-
ExploitHostile code rendered into generated source
-
ExecutionDeveloper or CI imports generated client
-
ImpactArbitrary Python executes in importing environment
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Code injection prevention, sandbox exec
MITRE ATT&CK
2 techniques across 2 tactics: Execution, Initial Access The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires that a victim run openapi-python-client prior to 0.29.1 to generate a client from an OpenAPI document whose string/docstring/f-string content is attacker-influenced (i.e., a spec the victim does not fully control, such as a third-party, public, or untrusted API definition), AND that the generated client subsequently be imported in a Python environment - importing is the trigger that executes the injected code. Limiting factors: active user/CI interaction is required (UI:P), the attack is local to the generation/import workflow rather than remotely reachable (AV:L), and organizations that only generate from trusted, internally-authored OpenAPI specs are effectively not exposed. Specifically unsafe areas were const/enum values, model/property descriptions rendered into docstrings, and values injected into f-string and double-quoted literals, which the fix now neutralizes via dedicated escaping helpers. |
| Impact | Signals are mixed and point to a serious but conditionally-triggered supply-chain/code-generation flaw rather than a mass-exploitable remote RCE. The vendor CVSS 4.0 score of 8.4 (High) is driven by VI:H plus full subsequent-system impact (SC:H/SI:H/SA:H), reflecting that attacker-controlled Python is injected into generated client code and runs with the privileges of whoever imports it. However, AV:L and UI:P (user must actually generate and then import the client from an attacker-influenced OpenAPI document) substantially reduce real-world reach compared with an unauthenticated network RCE - this is not wormable or drive-by. No EPSS score, no CISA KEV listing, and no public exploit were provided in the input, so there is no public exploit identified at time of analysis and no evidence of active exploitation. Note a tension in the impact metrics: the vendor set the vulnerable-system confidentiality VC:N while the advisory and description describe arbitrary code execution in the importing environment, which normally implies confidentiality impact too; the N appears conservative and defenders should treat successful exploitation as full compromise of the importing host. Net priority: genuinely high for any team that generates clients from OpenAPI documents they do not fully control (third-party/public specs), and low for teams that only process trusted, internally-authored specs. |
| Exploit ScenarioDerived | An attacker crafts a malicious OpenAPI document containing hostile content in string, docstring, or f-string fields; a developer or CI pipeline using openapi-python-client prior to 0.29.1 generates a Python client from that document, and the attacker-controlled Python is embedded in the generated source. The code executes the moment the generated client is imported, compromising the importing environment. No public proof-of-concept was provided in the input. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Oct 06, 2026
Openapi-python-client before 0.29.1 fails to neutralize attacker-influenced content from an OpenAPI document when rendering string, docstring, and f-string contexts, so a malicious or untrusted specification can cause arbitrary Python to be emitted into the generated client - code that then executes when that client is imported, compromising the integrity of the importing environment and potentially its confidentiality and availability. Exposure is conditional: it requires someone to generate a client from a spec they do not fully control (a third-party, public, or otherwise untrusted API definition) and then import the generated code, which is the trigger point, so organizations generating only from trusted internal specs are effectively unaffected. The flaw is rated 8.4 under CVSS 4.0 in the source data (independent assessment maps it to CVSS 3.1 AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H), which is consistent with a serious but conditionally triggered supply-chain and code-generation issue rather than a remotely reachable mass-exploitation vector. No public exploit code and no confirmed active exploitation were identified at time of analysis, and the vendor has shipped a fix in version 0.29.1.
RemediationAI
Upgrade openapi-python-client to 0.29.1 or later (Vendor-released patch: 0.29.1, commit 1c99af478892e5bbe6583b92acba431c9dec9186, PR 1483, advisory GHSA-5293-mq8x-g3xj) and then treat every previously generated client as suspect: regenerate all clients produced by pre-0.29.1 versions from their source specs and diff the output before redeploying, since injected code may already sit dormant in checked-in generated packages and only executes on import. Because the trigger is importing malicious generated code, a practical compensating control pending upgrade is to restrict generation to internally authored, trusted OpenAPI documents and to block CI jobs from fetching third-party specs; the trade-off is loss of convenience from auto-generating against public APIs. Additionally, review generated output for the UntrustedString sentinel, which indicates a value that was not routed through one of the new escaping helpers, and scan or manually inspect generated modules where legitimate spec content cannot be distinguished from injected code. Be aware that this release is deliberately breaking for all custom templates - the utils global was renamed to strings and direct rendering of raw values is no longer permitted, so templates must use safe_for_docstring, in_f_string_literal, in_double_quote_literal, or as_unembedded_code as appropriate; failing to port templates will break generation, and applying the new helpers incorrectly (for example using as_unembedded_code on a value destined for a docstring) reintroduces the risk. Note also that most Unicode control characters are now stripped from string literals, which may alter generated const values, enums, or JSON body property names for APIs that rely on them, though most APIs are unaffected. Finally, enable or run the project's fuzz workflow (pdm fuzz, controlled by OPENAPI_PYTHON_CLIENT_FUZZ_EXAMPLES) against local specs to catch escaping regressions in custom templates.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in pypi
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The root cause is CWE-94 (Improper Control of Generation of Code, 'Code Injection') inside a code generator rather than in a running service. openapi-python-client consumes an OpenAPI document and emits Python source through Jinja-style templates, where values taken from the spec - model and property descriptions, const and enum values, JSON body property names - were previously interpolated into contexts such as triple-quoted docstrings, double-quoted string literals, and f-strings. Because those values were not escaped for the context into which they were rendered, content like a crafted """ terminator, a backslash escape, or an f-string expression brace could break out of the intended literal and become executable Python in the generated module. The fix is a context-aware escaping redesign: a new strings module replaces the old utils global, and values must now be described by how they will be used via dedicated helpers - strings.safe_for_docstring() for """ docstrings, strings.in_f_string_literal() for f"" literals, strings.in_double_quote_literal() for non-f-string "" literals, and as_unembedded_code() reserved strictly for PythonCode values that are intentionally code (for example .python_code, .get_type_string(), .get_instance_type_string(), .get_type_strings_in_union()). Any unescaped value surfaces as an UntrustedString sentinel in generated output, which makes residual escaping gaps observable. The same release strips most Unicode control characters from string literals and adds a fuzzing workflow (OPENAPI_PYTHON_CLIENT_FUZZ_EXAMPLES) to exercise generated Python, both defensive hardening measures tied to this class of bug. The CPE cpe:2.3:a:openapi-generators:openapi-python-client:*:*:*:*:*:*:*:* with no version bound matches every release before the fix.
Know when Python gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:N/VI:H/VA:N/SC:H/SI:H/SA:H
Attacker supplies a malicious document but the victim must generate and import the client (AV:L/UI:R/PR:N); injected code runs in a separate importing context (S:C) yielding full code execution (C/I/A:H).
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
2DescriptionCVE.org
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.
Articles & Coverage 1
Technical POC Analysis
Code injection into generated source: the generator emits Python identifiers, literals, docstrings, and f-strings derived from attacker-influenced OpenAPI document content without neutralizing the sp…
Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.
Executive ViewAI
Openapi-python-client, a tool that generates Python clients from OpenAPI specifications, contains a high-severity vulnerability (CVE-2026-105801) that allows arbitrary Python code execution when a generated client is imported, but only if the client was generated from an untrusted or third-party specification. This creates a supply-chain risk for development environments and CI/CD pipelines where such generated code is executed, potentially compromising the integrity, confidentiality, and availability of affected systems. No public exploit identified at time of analysis; the flaw is unauthenticated (PR:N) and requires user interaction (UI:R), so organizations using this tool with external specs should prioritize mitigation.
No vendor-released patch identified at time of analysis. Interim mitigations include: only generate clients from fully trusted internal OpenAPI specifications; manually inspect all generated Python code before import; generate and run clients in isolated, least-privileged environments such as containers without network access or credentials; use static analysis or code scanning to detect unexpected code in generated files; and restrict execution of generated clients to authorized developers.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Code injection occurs when an application accepts user input and passes it directly into a language interpreter or evaluator without proper sanitization.
Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.
Wazuh SIEM platform versions 4.4.0 through 4.9.0 contain an unsafe deserialization vulnerability in the DistributedAPI t
BentoML version 1.4.2 and earlier contains an unauthenticated remote code execution vulnerability through insecure deser
pgAdmin 4 contains critical remote code execution vulnerabilities in the Query Tool download and Cloud Deployment endpoi
The renderLocalView function in render/views.py in graphite-web in Graphite 0.9.5 through 0.9.10 uses the pickle Python
BentoML is a Python library for building online serving systems optimized for AI apps and model inference. Rated critica
OpenSSL before 0.9.8za, 1.0.0 before 1.0.0m, and 1.0.1 before 1.0.1h does not properly restrict processing of ChangeCiph
pyLoad download manager version prior to 0.5.0b3.dev77 exposes the Flask SECRET_KEY through an unauthenticated endpoint.
Langflow (a visual LLM pipeline builder) contains a critical unauthenticated code execution vulnerability (CVE-2026-3301
In Mercurial before 4.1.3, "hg serve --stdio" allows remote authenticated users to launch the Python debugger, and conse
Unauthenticated remote code execution affects Kestra OSS (the open-source event-driven orchestration platform) prior to
Unauthenticated remote code execution in Marimo ≤0.20.4 allows attackers to execute arbitrary system commands via the `/
pyLoad is the free and open-source Download Manager written in pure Python. Rated medium severity (CVSS 5.3), this vulne
EUVD-2026-93435
GHSA-5293-mq8x-g3xj
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB