CVE-2026-130488: 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
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 toapp.
addmiddleware keeps middleware objects in a separate stack. These include PAGI::Middleware classes such as Auth::Basic, and the CSRF middleware that enablecsrf installs. toapp, 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.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
PAGI-FastAPIto a version that resolves this vulnerability.Fixed in 1.4.0
Event History
Frequently Asked Questions
Which deployments are exposed?
Applications built with to_app are exposed if they rely on authentication or CSRF middleware added as middleware objects. This affects PAGI::Middleware classes such as Auth::Basic and the CSRF middleware installed by enable_csrf.
What does an attacker need to exploit this issue?
A remote attacker can directly call routes that were expected to require credentials because the registered authentication middleware does not run. They can also forge cross-site requests to state-changing routes when the intended CSRF middleware is bypassed.
How can I determine whether an application is affected?
Review applications using to_app and check whether add_middleware registered authentication or CSRF middleware objects. Middleware registered as a code reference is unaffected.
What version resolves the issue?
Upgrade to PAGI::FastAPI 1.4.0 or later. Versions from 1.0.0 before 1.4.0 are affected.