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

Summary

CVECVE-2026-78655
StatePUBLISHED
AssignerCPANSec
Source PriorityCVE Program / NVD first with legacy fallback
Published2026-08-25 22:17:06 UTC
Updated2026-08-25 23:17:59 UTC
DescriptionPunk::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.

Risk And Classification

Problem Types: CWE-307 | CWE-642 | CWE-307 CWE-307 Improper Restriction of Excessive Authentication Attempts | CWE-642 CWE-642 External Control of Critical State Data

References

ReferenceSourceLinkTags
metacpan.org/release/LNATION/Punk-TOTP-0.05/source/Changes 9b29abf9-4ab0-4765-b253-1875cd9b441e metacpan.org
metacpan.org/release/LNATION/Punk-TOTP-0.04/view/lib/Punk/Plugin/TOTP.pm 9b29abf9-4ab0-4765-b253-1875cd9b441e metacpan.org
metacpan.org/release/LNATION/Punk-TOTP-0.04/source/include/ptotp/ptotp_plu... 9b29abf9-4ab0-4765-b253-1875cd9b441e metacpan.org
www.openwall.com/lists/oss-security/2026/08/25/7 af854a3a-2127-422b-91ae-364da2661108 www.openwall.com
metacpan.org/release/LNATION/Punk-0.32/view/lib/Punk/Session.pm 9b29abf9-4ab0-4765-b253-1875cd9b441e metacpan.org
CVE Program record CVE.ORG www.cve.org canonical
NVD vulnerability detail NVD nvd.nist.gov canonical, analysis

Additional Advisory Data

Solutions

CNA: Upgrade to Punk-TOTP 0.05 or later, and add the two columns the count is kept in to the user table (totp_failed and totp_failed_at by default, named by fields).

Workarounds

CNA: For deployments that cannot upgrade to 0.05, declare the session keyword with a store, which needs a Punk::Cache backend shared between workers. The cookie then carries only an opaque id and the counter is out of the client's reach.

© CVE.report 2026

Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user's risk. It is the responsibility of user to evaluate the accuracy, completeness or usefulness of any information, opinion, advice or other content. EACH USER WILL BE SOLELY RESPONSIBLE FOR ANY consequences of his or her direct or indirect use of this web site. ALL WARRANTIES OF ANY KIND ARE EXPRESSLY DISCLAIMED. This site will NOT BE LIABLE FOR ANY DIRECT, INDIRECT or any other kind of loss.

CVE, CWE, and OVAL are registred trademarks of The MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. This site includes MITRE data granted under the following license.

Free CVE JSON API cve.report/api

CVE.report and Source URL Uptime Status status.cve.report