fastapi-code-generator creates FastAPI applications from OpenAPI files. Prior to 0.8.1, the generator inserts an OpenAPI path into a generated @app.get(...) route decorator as a single-quoted generated route string without escaping embedded quotes. An attacker-controlled or attacker-influenced OpenAPI path can close the string and inject a valid Python expression into the decorator argument. Syntax-breaking input only causes generation to fail, but syntactically valid generated code executes with the application's or CI process's privileges when the generated module is imported and the decorator is evaluated. This OpenAPI path sink is distinct from the project's separate operation-summary docstring and additional-response-key sinks. This issue is fixed in version 0.8.1.
0.3% estimated probability of exploitation activity in the next 30 days; 24th percentile. Scored 2026-11-04. A forecast for this CVE across the internet, not for your own systems.
CWEs
CWE-94Improper Control of Generation of Code (Code Injection) CWE-116Improper Encoding or Escaping of Output
Show the promptExplain CVE-2026-63471 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2026-63471?via=ask-ai-copy and https://cve.bz/cve/CVE-2026-63471?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2026-63471 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.
Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.
Versions
From the CNA's record in the CVE List.
Product
Affected
koxudaxi fastapi-code-generator
< 0.8.1
Attack patterns (CAPEC)
CAPEC-35 Leverage Executable Code in Non-Executable Files Likelihood: High · Severity: Very High
CAPEC-77 Manipulating User-Controlled Variables Likelihood: High · Severity: Very High
CAPEC-242 Code Injection Likelihood: High · Severity: High
CAPEC-73 User-Controlled Filename Likelihood: High · Severity: High
CAPEC-81 Web Server Logs Tampering Likelihood: Medium · Severity: High
CAPEC-85 AJAX Footprinting Likelihood: High · Severity: Low
CAPEC-104 Cross Zone Scripting Likelihood: Medium · Severity: High
The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.