Unauthenticated Route Refusal in Dancer2 Versions 2.0.0-2.1.9
CVSS 3.1
7.5high
EPSS
—
Published
()
Modified
AI analysis
Dancer2 versions prior to 2.2.0 contain a flaw in Perl dispatch where a dying hook can refuse a route. When the exception handler halts the response, the cleanup process fails to stop the request, response, and session, allowing a refused route to execute. Attackers can exploit this flaw to gain unauthorized access or execute commands on affected systems. The vulnerability is primarily present in Dancer2 versions from 2.0.0 up to 2.1.9, and there are no known public exploits.
What to do: Upgrade Dancer2 versions to 2.2.0 or later to mitigate the vulnerability. Apply mitigations such as strict exception handling and verification of the response halting mechanism. Monitor deployment for known versions and update accordingly.
Affected
Dancer2
2.0.0 to 2.1.9
Estimated exposure
nicheNo basis for an estimate.
Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.
Description
Dancer2 versions from 2.0.0 before 2.2.0 for Perl dispatch a route that a dying hook refused when the exception handler halts the response in compile_hooks. A hook that dies fires core.app.hook_exception, then calls cleanup unless the failing hook is the exception handler. A handler that halts does not stop that cleanup, which discards the request, response and session the dispatcher has yet to read, so the refused route runs. The handler has to halt the response object by calling its halt method or setting is_halted: the halt keyword unwinds through with_return before cleanup runs. A check in a before hook is not enforced: the caller gets the refusal, while the route body runs and its writes land.
Dancer2 before 2.2.0 can dispatch a route a dying hook refused when compile_hooks exception handling halts the response.
Stig Palmquist disclosed CVE-2026-93710 in the Perl Dancer2 web framework on oss-security. Versions from 2.0.0 before 2.2.0 can still dispatch a route that a dying hook intended to refuse when the exception handler halts the response inside compile_hooks. The report does not describe exploitation in the wild.