Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessIdentify Dancer2 app with auto_page enabled
-
DeliveryCraft request path with equivalent spelling of layout dir
-
ExploitBypass AutoPage text-comparison guard
-
ExecutionLookup canonicalises path to layout file
-
ImpactServer renders and returns other layout template
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V5 - File Handling Path traversal prevention
|
| Exploitation Conditions | Requires the AutoPage handler to be explicitly enabled via the auto_page configuration setting, which is OFF by default in Dancer2 - this is the primary limiting factor. Given that, an unauthenticated remote attacker submits a request whose path is an equivalent spelling of the layout directory (a doubled slash, a /./ dot segment, a percent-encoded slash, or a different capitalisation), which misses the handler's literal text guard while the subsequent view lookup canonicalises it to the real file. The capitalisation-variant additionally requires a case-insensitive filesystem (typically macOS or Windows hosts); the doubled-slash, dot-segment and percent-encoded-slash variants work on any filesystem. Impact is confined to disclosure of one of the application's other layout templates - no code execution, no credentials, no write access. |
| Impact | This is a genuinely low-priority information-disclosure flaw despite the network attack vector. The CVSS 5.3 (AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N) reflects unauthenticated remote access with only limited confidentiality impact and no integrity or availability effect - consistent with CWE-41 path-equivalence leaking a template rather than code execution or credential theft. EPSS reinforces low real-world risk at 0.19% (8th percentile), and there is no CISA KEV listing and no public exploit code (only the upstream issue and patch commits), so exploitation status is 'no public exploit identified at time of analysis.' A critical mitigating fact not captured in the base score: the vulnerable AutoPage handler is OFF BY DEFAULT and only active when an operator sets auto_page, and the capitalisation-variant of the bypass additionally requires a case-insensitive filesystem (macOS/Windows). No signals conflict here - CVSS, EPSS, and the disclosed-impact all point the same direction. Net: a real but minor bug, correctly rated MEDIUM/LOW; the main confidentiality loss is one additional non-active layout template, which the vendor advisory itself notes is close to already-public content. |
| Exploit ScenarioDerived | An attacker who notices a Dancer2 app has auto_page enabled requests a layout path using an equivalent spelling - e.g. a doubled slash, a /./ dot segment, a percent-encoded slash, or a differently-cased path on a case-insensitive host - so the request slips past the AutoPage text-comparison guard while the follow-on lookup canonicalises it to the real file. The handler then renders and returns one of the application's non-default layout templates. No public exploit code exists, but the technique is trivial to reproduce from the description and patch. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Sep 23, 2026
Layout template disclosure in Dancer2, the Perl web application framework, allows an unauthenticated remote requester to retrieve one of an application's layout templates by requesting a path that is spelled differently from, but resolves identically to, the layout directory. Versions before 2.2.0 are affected, and the flaw is reachable only when the AutoPage handler is explicitly turned on via the auto_page setting, which is off by default; the attacker exploits the gap between the handler's literal text comparison of the request path and the canonicalising lookup that follows, using a doubled slash, a dot segment, a percent-encoded slash, or a differently-cased path on a case-insensitive filesystem. Impact is confined to reading another layout template - no code execution, no credentials, no write access - and no public exploit code has been identified at time of analysis, with EPSS at 0.19% (8th percentile).
RemediationAI
Upgrade Dancer2 to 2.2.0 or later - vendor-released patch: 2.2.0 (CPAN release CROMEDOME/Dancer2-2.2.0), available from the vendor and incorporating the two upstream commits 293fce08812b0928f34ab2d7b9357450707c3630 and 753b385350a54acb8d4b686723890205268634a8, which replace the textual layout-directory prefix check with a realpath-based containment test. The metacpan changes file for 2.2.0, the GitHub issue PerlDancer/Dancer2#1823, and the oss-security advisory at seclists.org/oss-sec/2026/q3/856 document the fix and the affected spellings. Because the guard is only reachable through the AutoPage handler, the strongest compensating control is to leave auto_page disabled or explicitly set auto_page: 0, which is the framework default and removes the vulnerable handler from the route handler chain entirely; note that route_handlers is read once when the application object is constructed, so this requires a configuration change plus an application restart rather than a runtime toggle, and it costs the convenience of serving templates without declaring routes. If auto_page must stay on before the upgrade can be deployed, Dancer2 cannot configure away just the bypass - the layout directory name is what the guard matches on - so the practical interim option is to move each non-public layout outside the views tree and reference it by an explicit path, or to accept the disclosure risk while restricting access to the application at the reverse proxy for untrusted networks; both carry operability costs and neither is as clean as upgrading.
Affected ProductsAI
Dancer2 for Perl, all versions before 2.2.0, are affected; the fix lands in the 2.2.0 CPAN release (CROMEDOME/Dancer2-2.2.0), whose changes file is listed among the references. The vulnerable code is in lib/Dancer2/Handler/AutoPage.pm and is only loaded when auto_page is enabled in configuration, so applications using Dancer2 defaults are not exposed. Debian tracks four releases of the package, so downstream distributions should confirm which of their suites still carry pre-2.2.0 code. No CPE strings were supplied with the advisory data, and the primary upstream references for impact and scope are the GitHub issue PerlDancer/Dancer2#1823 and the oss-security advisory threaded at seclists.org/oss-sec/2026/q3/856 with its openwall mirror. The European advisory record is ENISA EUVD-2026-84255.
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
Dancer2's AutoPage handler (lib/Dancer2/Handler/AutoPage.pm) turns an undeclared request path directly into a view path and serves the matching template, with an explicit carve-out so that layout templates are not rendered as pages: if the request path textually starts with the layout directory name, the handler passes the request through. That guard operates on the raw request string, whereas the view lookup that follows resolves the path on disk, so the two disagree on what counts as the same location. This is a CWE-41 improper resolution of equivalence failure - the request path is never canonicalised before the guard decision. Concrete bypasses are a doubled slash, a /./ dot segment, a percent-encoded slash, and a case variation on a case-insensitive filesystem such as macOS or Windows; the case variant is filesystem-dependent, while the slash and dot-segment variants work anywhere. The vendor fix in 2.2.0 adds Path::Tiny and replaces the string-prefix test with an authoritative containment check that resolves both the layout directory and the page's own parent directory via realpath and tests subsumption, mirroring the send_file containment logic already used in Dancer2/Core/App.pm. It deliberately does not use view_path/view_pathname, because that method is engine-specific and Template Toolkit overrides it to return a bare template name rather than a filesystem path; instead it joins $template->views, which the Template role guarantees is absolute, with the page path. An existing test suite (t/integration/template/autopage.t) probes all of these spellings, including a runtime probe for case-insensitive filesystems.
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:L/I:N/A:N
Remote unauthenticated request bypasses the guard reliably via path-equivalence tricks (AV:N/AC:L/PR:N/UI:N); impact limited to disclosing one layout template, so C:L with I:N/A:N.
Primary rating from Vendor (CPANSec).
CVSS VectorVendor: CPANSec
Lifecycle Timeline
2DescriptionCVE.org
Dancer2 versions before 2.2.0 for Perl serve a layout as a page when an equivalent spelling of its path misses the guard in the AutoPage handler.
The handler compares the request path against the layout directory name as text, while the lookup that follows canonicalises it. A doubled slash, a dot segment, a percent-encoded slash, or a different capitalisation on a case-insensitive filesystem therefore misses the guard.
The handler is off by default, enabled with auto_page. The layout wrapping every page is already public, so this discloses one of the application's other layouts.
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
Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.
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-41 – Improper Resolution of Path Equivalence
View allSame technique Information Disclosure
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) | unimportant |
EUVD-2026-84255
GHSA-8fpv-59mj-6jfr
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB