PAGI::FastAPI before 1.4.0 skips auth and CSRF (CVE-2026-130488)
Applications built with to_app can serve requests without registered authentication or CSRF middleware.
Missing auth and CSRF middleware in PAGI::FastAPI to_app
PAGI::FastAPI for Perl stores middleware from add_middleware, including Auth::Basic and the CSRF middleware installed by enable_csrf, in a stack that to_app never applies, with no warning. Remote attackers can call protected routes without credentials and forge cross-site state-changing requests. Code-reference middleware is unaffected. Apps built with to_app on 1.0.0 before 1.4.0 are affected.
What to do: Upgrade PAGI::FastAPI to 1.4.0. Middleware registered as a code reference is not affected.
| Product | Affected | Fixed in |
|---|---|---|
| PAGI::FastAPI | 1.0.0 before 1.4.0 | 1.4.0 |
Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.
PAGI::FastAPI versions from 1.0.0 before 1.4.0 for Perl serve requests without registered authentication or CSRF middleware in applications built with to_app. add_middleware keeps middleware objects in a separate stack. These include PAGI::Middleware classes such as Auth::Basic, and the CSRF middleware that enable_csrf installs. to_app, the entry point the documentation deploys with, never applies that stack, and nothing warns that the middleware does not run. Middleware registered as a code reference is unaffected. A remote attacker can call protected routes without credentials and forge cross-site state-changing requests.
Applications built with to_app can serve requests without registered authentication or CSRF middleware.
Today 2.5K readers · 5K views · 287 reads · all time 290K views