{"id":"CVE-2026-63471","published":"2026-11-03T20:18:15Z","modified":"2026-11-07T04:17:32Z","title":"fastapi-code-generator: Import-time RCE via route path -> unescaped @app.get('...') decorator","vendor":"koxudaxi","product":"fastapi-code-generator","tier":"core","eol":null,"affectedVersions":[{"vendor":"koxudaxi","product":"fastapi-code-generator","versions":["< 0.8.1"]}],"ssvc":{"exploitation":"poc","automatable":"yes","technicalImpact":"total","timestamp":"2026-11-07T03:25:31.132002Z","from":"CISA ADP","provenance":"source"},"nvdStatus":"Deferred","description":{"text":"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.","provenance":"source","from":"NVD"},"summary":{"text":"fastapi-code-generator, prior to version 0.8.1, fails to escape quotes in OpenAPI path values when it writes them into generated @app.get(...) route decorators, so an attacker-influenced path can inject a Python expression into the decorator argument. An attacker who can supply or influence the OpenAPI file can have injected code run with the privileges of the application or CI process once the generated module is imported and the decorator is evaluated, with no authentication, network access, or user interaction required.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-21T03:48:23Z"},"cvss":{"score":9.3,"severity":"CRITICAL","version":"4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","provenance":"source","from":"NVD"},"epss":{"score":0.00468,"percentile":0.41288,"date":"2026-11-21","provenance":"source"},"kev":null,"vulncheckKev":null,"exploited":false,"otx":{"pulseCount":8,"pulses":[{"name":"Known_Cve | Nov 12, 2026 | Part 1/3","url":"https://otx.alienvault.com/pulse/6af481765ddcbfde708ea523","created":"2026-11-11"},{"name":"Known_Cve | Nov 11, 2026 | Part 1/3","url":"https://otx.alienvault.com/pulse/6af32f9bb8f82537ce5771fc","created":"2026-11-10"},{"name":"Known_Cve | Nov 10, 2026 | Part 1/2","url":"https://otx.alienvault.com/pulse/6af1de48edf0afc015fdbf9e","created":"2026-11-09"},{"name":"Known_Cve | Nov 9, 2026 | Part 1/2","url":"https://otx.alienvault.com/pulse/6af08d78fae68d2bf8ab0a89","created":"2026-11-08"},{"name":"Known_Cve | Nov 8, 2026 | Part 1/3","url":"https://otx.alienvault.com/pulse/6aef3b029d93097c770c01f5","created":"2026-11-07"},{"name":"Known_Cve | Nov 7, 2026 | Part 2/2","url":"https://otx.alienvault.com/pulse/6aede8fd73ec58c18b4cb4bd","created":"2026-11-06"},{"name":"Known_Cve | Nov 6, 2026 | Part 2/2","url":"https://otx.alienvault.com/pulse/6aec9814761aea31240fbf8c","created":"2026-11-05"},{"name":"Known_Cve | Nov 5, 2026 | Part 2/3","url":"https://otx.alienvault.com/pulse/6aeb4640975e6631ab96b181","created":"2026-11-04"}],"provenance":"machine"},"cwes":[{"id":"CWE-94","name":"Improper Control of Generation of Code"},{"id":"CWE-116","name":"Improper Encoding or Escaping of Output"}],"references":[{"url":"https://github.com/koxudaxi/fastapi-code-generator/commit/49301dbdb82170d7f50877419d994b05cb1fa2bc","tags":["x_refsource_MISC"]},{"url":"https://github.com/koxudaxi/fastapi-code-generator/commit/b3b9bd66e0b0c4d8c686fda700258104615a1332","tags":["x_refsource_MISC"]},{"url":"https://github.com/koxudaxi/fastapi-code-generator/releases/tag/0.8.1","tags":["x_refsource_MISC"]},{"url":"https://github.com/koxudaxi/fastapi-code-generator/security/advisories/GHSA-p2mm-64f6-gmpp","tags":[]},{"url":"https://github.com/koxudaxi/fastapi-code-generator/security/advisories/GHSA-p2mm-64f6-gmpp","tags":["x_refsource_CONFIRM"]}],"techniques":[],"reports":[],"affected":[{"ecosystem":"PyPI","package":"fastapi-code-generator","vulnerableRanges":["<0.8.1"],"patched":["0.8.1"],"from":["GHSA-p2mm-64f6-gmpp"],"provenance":"source"}],"advisories":[{"id":"GHSA-p2mm-64f6-gmpp","url":"https://github.com/advisories/GHSA-p2mm-64f6-gmpp","severity":"CRITICAL","ecosystem":"PyPI","package":"fastapi-code-generator","vulnerableRanges":["<0.8.1"],"patched":["0.8.1"],"provenance":"source","from":"GHSA"}],"euvd":{"id":"EUVD-2026-116147","url":"https://euvd.enisa.europa.eu/vulnerability/EUVD-2026-116147","exploited":false,"exploitedSince":null,"provenance":"source"},"exploits":[],"exploitSources":null,"exploitRefs":[],"flow":[],"timeline":[{"date":"2026-11-03","kind":"published","label":"Published (NVD)","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-63471","provenance":"source"}],"speed":{"daysToPublicExploit":null,"firstExploitFrom":null,"daysToKev":null},"priority":{"score":16.9,"factors":[{"name":"In a KEV catalog","points":0.0,"detail":"not listed"},{"name":"Recent KEV listing","points":0.0,"detail":"not listed"},{"name":"Known ransomware use","points":0.0,"detail":"not known"},{"name":"EPSS percentile","points":8.26,"detail":"percentile 0.4129"},{"name":"Named in threat reports","points":0.0,"detail":"0 reports"},{"name":"Public exploit code","points":0.0,"detail":"none found"},{"name":"Mentioned in OTX pulses","points":2.17,"detail":"8 pulses"},{"name":"CVSS severity","points":6.51,"detail":"base score 9.3"},{"name":"End-of-life product","points":0.0,"detail":"supported or unknown"}]}}