GHSA-m82c-83jf-3j4v
Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessRegister attacker-controlled account and obtain own recovery code
-
DeliveryAcquire victim password out of band
-
ExploitFail primary TOTP at victim's challenge route
-
ExecutionSubmit attacker's recovery code, user_id coerces to zero
-
PersistOwnership check passes, complete victim 2FA
-
ImpactFull victim account takeover
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A07:2025 - Authentication Failures
ASVS 5.0
V6 - Authentication Primary weakness mitigation
|
| Exploitation Conditions | Exploitation requires three concrete prerequisites, all named in the description: (1) the attacker already knows the victim's account password, since the recovery code is only accepted after primary TOTP verification fails at the challenge route; (2) the attacker possesses a valid recovery code issued to an account they control; and (3) the target application keys its user models on a NON-numeric identifier - a username, email address, or UUID - because the bypass depends on Perl integer coercion collapsing such identifiers to zero so two of them compare equal. What LIMITS exploitation: deployments using purely numeric primary keys are NOT vulnerable (the comparison works as intended), and the attacker must have both the victim's password and their own recovery-capable account, making this a targeted rather than opportunistic attack despite the AV:N/AC:L/PR:N CVSS vector. |
| Impact | The published CVSS 3.1 vector (AV:N/AC:L/PR:N/UI:N, C:H/I:H/A:H = 9.8) treats this as trivially exploitable and unauthenticated, but the description contradicts that: the attacker must already know the victim's password (first factor) AND hold a valid recovery code of their own (implying an attacker-controlled account), AND the target application must key user models on a non-numeric identifier. Those are meaningful preconditions, so the real-world attack complexity and privilege requirements are higher than PR:N/AC:L suggest - I assess this closer to PR:L/AC:H. Signals otherwise point to low urgency: no KEV listing (not actively exploited), no public POC identified, and EPSS of 0.44% (37th percentile) indicating low predicted exploitation. The impact when conditions are met is genuine account takeover of a targeted victim, but this is a targeted, precondition-heavy attack rather than mass-exploitable RCE. Net priority: patch promptly if you run this module with non-numeric user keys, but this is not an emergency drop-everything issue for most environments. Note the 'Information Disclosure' tag understates impact, which is really an authentication/integrity bypass. |
| Exploit ScenarioDerived | An attacker who has phished or reused a victim's password reaches the TOTP challenge, fails standard TOTP verification, then submits a recovery code from their own registered account. Because both accounts are keyed on non-numeric identifiers that coerce to zero, the ownership check passes and the attacker completes the victim's second factor, achieving full account takeover. No public exploit is identified at time of analysis, but the logic is simple enough to reproduce from the advisory once the target's key scheme is known. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv2 – Aug 26, 2026
Two-factor authentication bypass in the Perl module Punk::Plugin::TOTP before 0.05 lets an attacker who already knows a victim's password clear the victim's TOTP challenge using a recovery code issued to the attacker's own account. The flaw stems from the recovery-code helper looking up codes by digest across all users and then binding ownership through a numeric comparison of user identifiers, which fails whenever accounts are keyed by username, email, or UUID. No CISA KEV listing and no public exploit identified at time of analysis, with a low EPSS score of 0.44% (37th percentile) despite the 9.8 CVSS rating.
Earlier versions of this analysis (1)
Authentication bypass in Punk::Plugin::TOTP before 0.05 for Perl allows an attacker who knows a victim's password and holds their own valid recovery code to fully bypass the victim's two-factor authentication. The flaw lies in Perl's integer coercion: when user identifiers are non-numeric (email address, username, or UUID), they each coerce to zero, making any two such identifiers compare as equal in the ownership check inside totp_use_recovery. Because the recovery code search scans all users by digest first and only then checks ownership via this broken comparison, an attacker's own legitimate recovery code passes as valid for any other account sharing the same coercion behaviour. No public exploit or CISA KEV listing identified at time of analysis, but the exploit logic is trivial once prerequisites are met.
RemediationAI
Upgrade to Punk::Plugin::TOTP 0.05 or later - Vendor-released patch: 0.05 (see the Changes file at https://metacpan.org/release/LNATION/Punk-TOTP-0.05/source/Changes and the oss-security advisory at https://seclists.org/oss-sec/2026/q3/574 / http://www.openwall.com/lists/oss-security/2026/08/25/6). If you cannot upgrade immediately, the most effective compensating control is to ensure your application's user identifiers used in the recovery-code ownership check are numeric primary keys rather than usernames, emails, or UUIDs, since the bug only triggers on non-numeric keys - but changing your user-model key scheme is invasive and may not be feasible. As a safer interim measure, disable the recovery-code path entirely (force users through the standard TOTP flow or an out-of-band reset) so the vulnerable totp_use_recovery helper is never reached; the trade-off is that legitimate users lose self-service recovery until you patch. Because the attack also requires knowledge of the victim's password, enforcing password resets or monitoring for anomalous successful recovery-code use adds defense in depth but does not remove the flaw.
Affected ProductsAI
Punk::Plugin::TOTP (the Punk-TOTP distribution by LNATION on CPAN) at all versions before 0.05; version 0.04 is the last vulnerable release (vulnerable code visible at https://metacpan.org/release/LNATION/Punk-TOTP-0.04/view/lib/Punk/Plugin/TOTP.pm), and 0.05 contains the fix (https://metacpan.org/release/LNATION/Punk-TOTP-0.05/source/Changes). No CPE was supplied in the input. Deployments are affected in practice only when user models are keyed on a non-numeric identifier such as a username, email address, or UUID; applications using purely numeric primary keys are not exploitable. Distribution page: https://metacpan.org/dist/Punk-TOTP; ENISA EUVD-2026-66119; advisory thread at https://seclists.org/oss-sec/2026/q3/574.
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 affected component is the totp_use_recovery helper in the Punk::Plugin::TOTP Mojolicious/Perl plugin (author LNATION on CPAN). When a user submits a recovery code, the helper queries the recovery model for a row matching the code's digest alone - not scoped to the current user - so it can return any user's row bearing that digest. The subsequent ownership check compares the row's user_id against the challenged user's id using Perl's loose integer coercion (numeric ==). Under that coercion, any identifier string with no leading digits - a username, an email address, or a UUID - coerces to 0, so two such identifiers compare as equal, defeating the ownership binding. This maps to CWE-305 (authentication bypass by primary weakness): the sole control tying a recovery code to its account is a comparison that silently collapses to a false-positive for non-numeric keys. Purely numeric primary keys coerce correctly and are not affected.
Know when the next one hits your stack
- 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:H/A:H
AC:H and PR:L because the attacker needs their own recovery-enabled account plus the victim's password and a non-numeric key scheme; account takeover yields C:H/I:H, no availability impact.
Primary rating from Vendor (CNA).
CVSS VectorVendor
Lifecycle Timeline
3Description PRE-NVD
Executive ViewAI
Punk::Plugin::TOTP (Perl module) before version 0.05 contains a critical vulnerability that bypasses two-factor authentication when an attacker holds a victim's password. This flaw undermines a key security control protecting user accounts, leaving organizations vulnerable to account takeover if password compromise occurs.
No vendor-released patch identified at time of analysis. Interim mitigations: disable recovery code functionality if not essential to business operations; require manual administrative verification and approval for any recovery code usage; implement audit logging for all recovery code operations; rate-limit recovery code attempts and implement time-based expiration on recovery codes.
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.
EUVD-2026-66119
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB