CVE-2026-78655: Punk::Plugin::TOTP versions before 0.05 for Perl allow the second-factor attempt limit to be reset by replaying an earlier session cookie because the challenge route counts failures in the session
Punk::Plugin::TOTP versions before 0.05 for Perl allow the second-factor attempt limit to be reset by replaying an earlier session cookie because the challenge route counts failures in the session.
The POST handler on challenge_path keeps the failure count as tries inside the totp_pending record in the session, raising it on each rejected code and deleting the pending record once it reaches attempts, five by default. Punk::Session carries the session in a signed cookie unless the application declares a store, and keeps no server-side record, so an earlier value of the same session stays valid until the expiry stamped inside it. A client that saves the cookie before its failed attempts and presents it again gets the pending record back with its counter, and the limit never fires. The replayed record is accepted while its own expiry, pending_ttl seconds from the challenge and 300 by default, has not passed.
Sessions declared with a store are not affected: the pending record and its counter then live server-side.
The attempt limit does not bound guessing of the second factor, which is left to the per-address rate limit the plugin registers on the same path, 30 requests per 60 seconds.
Security readout for executives and security teams
Plain-English summary
A flaw in Punk::Plugin::TOTP before 0.05 lets an attacker reuse an earlier valid session cookie to reset failed one-time-code attempts. This weakens MFA guessing protections and could enable account compromise if the attacker can reach the TOTP challenge. Applications using a server-side session store are not affected.
Executive priority
Treat internet-accessible affected deployments as an urgent authentication-control issue. Identify deployments immediately, prioritize upgrading cookie-session configurations, and verify server-side session deployments before deprioritizing them. There is no supplied evidence of active exploitation, but successful abuse could undermine MFA and expose account confidentiality and integrity.
Technical view
The challenge handler stores the failure counter inside totp_pending session data. With Punk::Session's default signed-cookie sessions, older cookie states remain valid until expiry. Replaying a pre-failure cookie restores the earlier counter during the pending window, 300 seconds by default. The separate per-address rate limit remains active at 30 requests per 60 seconds.
Likely exposure
Exposure is limited to applications running Punk::Plugin::TOTP before 0.05 with cookie-carried sessions and no declared server-side store. Systems using a session store are reported unaffected. Practical risk also depends on whether an attacker can reach the TOTP challenge and evade or distribute activity around the address-based rate limit.
Exploitation context
The CVSS score is 9.1, but the supplied sources do not report active exploitation and the CVE is not listed as KEV. Exploitation requires preserving and replaying a valid earlier challenge-session cookie before its pending expiry. The remaining per-address rate limit constrains request volume but does not restore the configured TOTP attempt limit.
Researcher notes
The core weakness combines insufficient attempt restriction with trust in client-carried session state, mapped to CWE-307 and CWE-642. The signed cookie prevents modification but not replay of an older authentic state. Evidence supports a bounded pending window and a separate address-based limiter; it does not establish real-world exploitation or universal account takeover.
Mitigation direction
Upgrade Punk::Plugin::TOTP to version 0.05 or later.
Configure a server-side session store so counters cannot be restored from old cookies.
Keep the challenge-route rate limit enabled and monitor for distributed guessing.
Review vendor release notes before deployment and test authentication flows afterward.
Validation and detection
Inventory Punk::Plugin::TOTP versions across deployed Perl applications.
Confirm whether each application declares a server-side Punk::Session store.
Verify challenge counters remain exhausted when an earlier session state is presented during authorized testing.
Confirm rate limiting applies to the configured TOTP challenge path.
Review authentication logs for repeated challenges, cookie reuse patterns, and distributed source addresses.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cwe · low confidence lookup
CWE-307: Exact CWE lookup
Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.
Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
1CVSS vectors
3Timeline events
2ADP providers
5Source links
SSVC decision data
CISA-ADPCISA Coordinator
Timestamp
Version
2.0.3
Exploitation: noneAutomatable: yesTechnical Impact: total
CVSS vector scores
1 official score
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.
CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.
CWE-307 · source CWE mapping
Improper Restriction of Excessive Authentication Attempts
Improper Restriction of Excessive Authentication Attempts represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.
External Control of Critical State Data represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.