CVE-2026-93710: CWE-460 Improper Cleanup on Thrown Exception
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.
AI Analysis
Technical Summary
This vulnerability arises from improper cleanup on thrown exceptions in Dancer2 versions >=2.0.0 and <2.2.0. When a hook dies, the core.app.hook_exception event fires, followed by a cleanup call unless the failing hook is the exception handler. However, if the exception handler halts the response without properly unwinding via the halt method or setting is_halted, cleanup discards critical objects, causing the dispatcher to run a refused route. The intended check in a before hook is bypassed, leading to execution of route code that should have been refused.
Potential Impact
The impact is that routes which should be refused due to exceptions in hooks may still execute, potentially leading to unintended code execution paths and inconsistent application state. This could cause logic errors or unexpected behavior in applications using affected Dancer2 versions. There is no indication of remote code execution or privilege escalation from the provided data.
Mitigation Recommendations
No official patch or fix is indicated in the provided data. Users should ensure that exception handlers properly halt the response by calling the halt method or setting is_halted to prevent improper cleanup. Monitor vendor advisories for official fixes. Patch status is not yet confirmed — check the vendor advisory for current remediation guidance.
CVE-2026-93710: CWE-460 Improper Cleanup on Thrown Exception
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.
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
This vulnerability arises from improper cleanup on thrown exceptions in Dancer2 versions >=2.0.0 and <2.2.0. When a hook dies, the core.app.hook_exception event fires, followed by a cleanup call unless the failing hook is the exception handler. However, if the exception handler halts the response without properly unwinding via the halt method or setting is_halted, cleanup discards critical objects, causing the dispatcher to run a refused route. The intended check in a before hook is bypassed, leading to execution of route code that should have been refused.
Potential Impact
The impact is that routes which should be refused due to exceptions in hooks may still execute, potentially leading to unintended code execution paths and inconsistent application state. This could cause logic errors or unexpected behavior in applications using affected Dancer2 versions. There is no indication of remote code execution or privilege escalation from the provided data.
Mitigation Recommendations
No official patch or fix is indicated in the provided data. Users should ensure that exception handlers properly halt the response by calling the halt method or setting is_halted to prevent improper cleanup. Monitor vendor advisories for official fixes. Patch status is not yet confirmed — check the vendor advisory for current remediation guidance.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- CPANSec
- Date Reserved
- 2026-09-18T15:06:15.116Z
- State
- PUBLISHED
Threat ID: 6ab1d39c55bf5e2cf5ca3a32
Added to database: 09/22/2026, 01:02:20 UTC
Last enriched: 09/22/2026, 01:16:49 UTC
Last updated: 09/22/2026, 01:32:46 UTC
Views: 4
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.