Security Advisories (2)
CPANSA-Dancer2-2018-01 (2018-01-30)

There is a potential RCE with regards to Storable. We have added session ID validation to the session engine so that session backends based on Storable can reject malformed session IDs that may lead to exploitation of the RCE.

CVE-2026-13577 (2026-07-20)

Dancer2 versions through 2.1.0 for Perl generate insecure session ids when required CSPRNG modules are unavailable. Dancer2::Core::Role::SessionFactory::generate_id silently falls back to a built-in rand-derived session id unless both Math::Random::ISAAC::XS and Crypt::URandom are available. The fallback session id is generated from a SHA-1 hash of a call to the built-in rand function, the absolute path of the Dancer2::Core::Role::SessionFactory module, an internal counter, the process id, the module instance memory address, and a shuffled string of characters (using the List::Util::shuffle function, which also uses the built-in rand function). These are all low-entropy and easily guessed sources. The built-in rand() function is seeded with 32-bits and considered unsuitable for security applications. Predictable session ids could allow an attacker to gain access to systems.

Documentation

Configure Dancer2 to suit your needs
Example-driven quick-start to the Dancer2 web framework
Common ways to put your Dancer2 app into use
Guide for developers interested in contributing to Dancer2
A gentle introduction to Dancer2
Steps to follow to hack on Dancer2
Reference manual for all hooks supported by Dancer2's core.
Recommended Dancer2 plugins
An example to get you dancing

Modules

Lightweight yet powerful web application framework
Core libraries for Dancer2 2.0
handles everything proper to a request's context.
A cookie representing class
Dancer2's Domain Specific Language (DSL)
Class representing fatal errors
Instantiate components by type and name
Manipulate hooks with Dancer2
Interface for accessing incoming requests
Class representing file upload requests
Response object for Dancer2
Config role for Dancer2 core objects
Role for hookable objects
Role for session factories
Role for file-based session factories
Dancer2's route handler
Top-layer class to start a dancer app
class to represent any session object
class to handle common helpers for time manipulations
Moo types for Dancer2 core.
File utility helpers
Capture dancer logs
a place to store captured Dancer2 logs
Test::More diag() logging engine for Dancer2
file-based logging engine for Dancer2
Test::More note() logging engine for Dancer2
Blackhole-like silent logging engine for Dancer2
Dynamic module loading helpers for Dancer2 core components
Extending Dancer2's DSL with plugins
a plugin for adding Ajax route handlers
Serializer for handling Dumper data
Serializer for handling JSON data
Serializer for handling YAML data
in-memory session backend for Dancer2
YAML-file-based session backend for Dancer2
Dancer2 own implementation of Template::Tiny
Pure Perl 5 template engine for Dancer2
Template toolkit engine for Dancer2
Template::Tiny engine for Dancer2
Useful routines for testing Dancer2 apps