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

- 種別: advisory
- 重大度: critical
- 関連技術: python, fastapi
- CVE: CVE-2026-63471
- 公開日時: 2026-11-09T19:48:08.000Z
- 情報源: GitHub Advisory Database (https://github.com/advisories/GHSA-p2mm-64f6-gmpp)
- パーマリンク: https://vulnpulse.app/items/ghsa-ghsa-p2mm-64f6-gmpp

影響: 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 /…