CyberRota Analysis
AI-GeneratedDancer2 versions prior to 2.2.0 are vulnerable due to a flaw in the handling of dying hooks, which allows a refused route to execute despite the exception handler halting the response. This can lead to unintended execution of code and potential data loss, as the cleanup process discards the request, response, and session information. Developers and organizations using affected versions of Dancer2 should prioritize updating to mitigate the risk of unauthorized code execution and data integrity issues.
Public Exploit Signal
A public exploit, PoC, GitHub repository or Metasploit reference was detected for this CVE.
Note: these links are listed for security research and verification purposes only.
Original NVD 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.