← Vulnerabilities

CriticalAdvisoryPythonFastAPI

fastapi-code-generator: Import-time RCE via route path -> unescaped @app.get('...') decorator

Affected

PackageAffected versionsFixed in
pip:fastapi-code-generator< 0.8.10.8.1

fastapi-code-generator (koxudaxi) emits the OpenAPI path into the generated main.py route decorator as a single-quoted string literal (@app.get('/u/ /x')) without escaping the '. A ' in the path closes the decorator string and, via concatenation, injects a live expression that the decorator argument evaluates when main.py is imported (the ASGI server imports it at startup) -- code execution, no request needed. The path is a pure data field. Verified on fastapi-code-generator 0.8.0 / Python 3 /…

Read on GitHub Advisory Database

On 11/10/2026, 04:48 AM, GitHub Advisory Database published "fastapi-code-generator: Import-time RCE via route path -> unescaped @app.get('...') decorator" (type: Advisory). Severity is "Critical" (critical). Related technologies: Python, FastAPI. CVE: CVE-2026-63471.