Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessIdentify Dancer2 app with File handler enabled
-
DeliverySend GET request with ../ traversal or percent-encoded dots
-
ExploitHandler joins path without collapsing segments
-
ExecutionReadable-file check passes on escaped path
-
PersistWorker serves file above public_dir
-
ImpactExfiltrate config.yml / secrets
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V5 - File Handling Path canonicalization, traversal prevention
MITRE ATT&CK
2 techniques across 2 tactics: Discovery, Collection The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires a specific non-default deployment: the application must (1) name File in its route_handlers configuration to activate Dancer2::Handler::File, and (2) set static_handler to 0 - because the default static handler collapses/refuses dot segments before the File route runs, and leaving it enabled blocks the attack. When both conditions are met, no authentication or user interaction is needed: an unauthenticated remote GET request containing relative path segments ( |
| Impact | The CVSS 3.1 base score of 7.5 (AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N) reflects an unauthenticated, network-reachable path-traversal that discloses arbitrary worker-readable files (C:H), with no integrity or availability impact - consistent with the CWE-22 classification and the 'Information Disclosure' tag. However, the raw score materially overstates real-world exposure because the affected code path is gated by non-default configuration: the File route handler is off by default and only becomes reachable when an application explicitly names File in route_handlers AND sets static_handler to 0 (the static handler otherwise rejects dot segments before the route runs). Corroborating signals point to low urgency: EPSS is 0.19% (8th percentile), there is no CISA KEV listing, and no public exploit code is identified in the provided intelligence. The mechanism is trivially exploitable where present (a simple GET for /../outside.txt, or percent-encoded dots), so AC:L is fair, but the aggregate picture is a genuine-but-config-limited flaw rather than a widespread emergency. No conflicting signals were found - the CVSS vector, description, and patch diff all agree the impact is confidentiality-only and remote-unauthenticated within the vulnerable configuration. |
| Exploit ScenarioDerived | An application that opts into Dancer2::Handler::File and disables the static handler (static_handler: 0) is deployed publicly. An unauthenticated attacker sends GET /../config.yml (or a percent-encoded variant like /..%2fconfig.yml), and the handler joins the path onto public_dir without collapsing '../' segments, serving the file because it only checks that the target is a readable regular file - exposing the application config and any other file the worker process can read. No public exploit code is identified at time of analysis, though the technique is elementary and reliably reproducible. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Sep 22, 2026
Unauthenticated path traversal in the Dancer2 Perl web framework (versions 2.1.0 up to but not including 2.2.0) lets a remote attacker read arbitrary files that the worker process can access, including configuration files such as config.yml stored above public_dir. The flaw only manifests in a non-default deployment where the application names File in its route_handlers configuration and sets static_handler to 0 - because the default static handler refuses dot segments before the File route executes; applications left at defaults are not affected. The vendor has released Dancer2 2.2.0 with a containment fix, EPSS is low (0.19%, 8th percentile), and no public exploit code or confirmed active exploitation was identified at time of analysis.
RemediationAI
Upgrade to Dancer2 2.2.0, the vendor-released patch version, via CPAN (cpanm Dancer2@2.2.0 or the metacpan release CROMEDOME/Dancer2-2.2.0); alternatively cherry-pick the upstream commit 2446a09ffb83fef71cc75c327bd6e4b1f007b885, available as a patch at https://github.com/PerlDancer/Dancer2/commit/2446a09ffb83fef71cc75c327bd6e4b1f007b885.patch, which adds realpath/containment checking to Dancer2::Handler::File and a NUL-byte rejection in Dancer2::Core/App. As an immediate compensating control for systems that cannot upgrade, remove File from the route_handlers list in config.yml and leave static_handler at its default enabled value - the default static handler refuses dot segments before the File route runs, so the traversal path is never reached; the trade-off is that you lose the custom File-handler behavior (for example per-handler public_dir overrides) and must fall back to the standard static handler or serve assets via send_file/Plack::App::File from inside a route. Note that keeping File in route_handlers while simply re-enabling static_handler also blocks the attack, since the static handler intercepts the request first, but this is fragile and does not address the underlying missing-canonicalization defect. Because exploitation requires no authentication and only a crafted GET request, review web server and application logs for requests containing '../' or percent-encoded dot sequences targeting the File handler as a detection measure, and see the vendor advisory GHSA-6xw8-v24c-m783 for the authoritative fix guidance.
Affected ProductsAI
Dancer2 for Perl, versions 2.1.0 and later but before 2.2.0, as published on CPAN (the metaCPAN release page CROMEDOME/Dancer2-2.2.0/changes documents the fixed release). The affected component is the optional Dancer2::Handler::File route handler, and only deployments that both list File in route_handlers and set static_handler to 0 are exploitable; default installations and applications that keep the static handler enabled are unaffected. Distribution-level tracking exists for Debian, with four releases tracked, and the issue is also catalogued under ENISA EUVD-2026-84258 and NVD CVE-2026-93712, with the vendor advisory at https://github.com/PerlDancer/Dancer2/security/advisories/GHSA-6xw8-v24c-m783 and the oss-security disclosure at https://seclists.org/oss-sec/2026/q3/859. No specific CPE strings were supplied in the input data, so product identification rests on the CPAN distribution name and version range.
Affects your stack
Find out whether the stacks and servers you run are on an affected version.
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The root cause is CWE-22 (Improper Limitation of a Pathname to a Restricted Directory), specifically a missing canonicalization step in Dancer2::Handler::File, a route handler that is disabled by default and only registered when an application lists File in route_handlers. The handler joins the incoming request path (PATH_INFO) onto the configured public_dir and then checks only that the resulting path names a readable regular file; because Path::Tiny does not collapse '../' segments, the joined string can point outside public_dir while still passing the -f check. A request such as /../outside.txt therefore escapes the document root, and percent-encoding the dots achieves the same result without trigging naive string filters. In a normal Dancer2 deployment the built-in static handler (Plack::App::File wrapped by Plack::Middleware::Conditional in Dancer2::Core::App::to_app) runs before the application and rejects or normalizes dot segments, which masks the flaw - which is why setting static_handler to 0 is a required precondition for exploitation. The upstream fix in commit 2446a09ffb83fef71cc75c327bd6e4b1f007b885 resolves the path with realpath and applies the same containment check used by send_file (Dancer2/Core/App.pm:1180-1182, Path::Tiny::subsumes against the realpath of public_dir), returning 403 on escape; the same commit also rejects NUL bytes in PATH_INFO in Dancer2::Core/App.pm to avoid warnings from Path::Tiny. The assessment vector AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N confirms the impact is confidentiality-only - arbitrary file disclosure with no integrity or availability effect.
Know when Perl gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
Remote unauthenticated GET with trivial traversal (AV:N/AC:L/PR:N/UI:N) yields arbitrary file read (C:H) with no write or availability impact; config-gating is a deployment prerequisite, not a base metric.
Primary rating from Vendor (CPANSec).
CVSS VectorVendor: CPANSec
Lifecycle Timeline
2DescriptionCVE.org
Dancer2 versions from 2.1.0 before 2.2.0 for Perl serve files from outside public_dir via relative path segments in the File route handler.
The handler joins the request path onto public_dir without collapsing relative segments, and checks only that the result is a readable regular file. A request for /../outside.txt escapes public_dir, and percent-encoding the dots reaches the same file.
The handler is off by default. An application is affected once it names File in route_handlers and sets static_handler to 0, which otherwise refuses a dot segment before the route runs.
Any file the worker process can read is served to an unauthenticated request, including the application's config.yml above public_dir.
Technical POC Analysis
CWE-22 (Improper Limitation of a Pathname to a Restricted Directory).
Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.
Executive ViewAI
Dancer2, a Perl web framework, contains a high-severity path traversal issue affecting versions 2.1.0 through releases before 2.2.0, but only in deployments that use a non-default File route handler with static handling disabled. Organizations running that specific configuration could face unauthorized disclosure of files accessible to the application process, including sensitive configuration data, while default deployments are not affected. A vendor patch is available, and no public exploit was identified at time of analysis.
Apply vendor patch.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Path traversal exploits occur when applications use user-controlled input to construct file system paths without proper validation.
Related Vulnerabilities in Dancer2 Perl Framework Multiple Vulnerabilities
View all 4The _compile function in Maketext.pm in the Locale::Maketext implementation in Perl before 5.17.7 does not properly hand
Stack-based buffer overflow in the CPerlHost::Add method in win32/perlhost.h in Perl before 5.24.3-RC1 and 5.26.x before
The VDir::MapPathA and VDir::MapPathW functions in Perl 5.22 allow remote attackers to cause a denial of service (out-of
Perl before 5.26.3 has a buffer overflow via a crafted regular expression that triggers invalid write operations. Rated
Perl before 5.26.3 and 5.28.0 before 5.28.1 has a buffer overflow via a crafted regular expression that triggers invalid
Perl before 5.26.3 has a buffer over-read via a crafted regular expression that triggers disclosure of sensitive informa
Perl might allow context-dependent attackers to bypass the taint protection mechanism in a child process via duplicate e
CPAN.pm before 2.35 does not verify TLS certificates when downloading distributions over HTTPS. Rated high severity (CVS
The XSLoader::load method in XSLoader in Perl does not properly locate .so files when called in a string eval, which mig
In Perl through 5.26.2, the Archive::Tar module allows remote attackers to bypass a directory-traversal protection mecha
Perl before 5.30.3 on 32-bit platforms allows a heap-based buffer overflow because nested regular expression quantifiers
The (1) S_reghop3, (2) S_reghop4, and (3) S_reghopmaybe3 functions in regexec.c in Perl before 5.24.0 allow context-depe
Same weakness CWE-22 – Path Traversal
View allSame technique Path Traversal
View allVendor StatusVendor
Debian
| Release | Status | Fixed Version | Urgency |
|---|---|---|---|
| bookworm | vulnerable | 0.400001+dfsg-1 | - |
| trixie | vulnerable | 1.1.2+dfsg-1 | - |
| forky, sid | vulnerable | 2.1.0-1 | - |
| (unstable) | fixed | (unfixed) | - |
EUVD-2026-84258
GHSA-fq22-f6q5-wv3x
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB