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.