fastapi-code-generator: Import-time RCE via route path -> unescaped @app.get('...') decorator
影響
| パッケージ | 影響する版 | 修正版 |
|---|---|---|
| pip:fastapi-code-generator | < 0.8.1 | 0.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 /…
重大な脆弱性・障害の速報を X で受け取る悪用・大規模な漏洩・障害を、対処法と一緒に。
@vulnpulse_app をフォロー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。