← 漏洞与更新

严重漏洞公告PythonFastAPI

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

受影响

软件包受影响版本修复版本
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 /…

在 GitHub Advisory Database 阅读

2026/11/10 04:48,GitHub Advisory Database 发布了“fastapi-code-generator: Import-time RCE via route path -> unescaped @app.get('...') decorator”(类型:漏洞公告)。严重程度为“严重”(critical)。相关技术:Python、FastAPI。CVE:CVE-2026-63471。