Skip to main content

Punk::Plugin::TOTP CVE-2026-78619

| EUVDEUVD-2026-66119 CRITICAL
Authentication Bypass by Primary Weakness (CWE-305)
9.8
CVSS 3.1 · Vendor
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Register attacker-controlled account and obtain own recovery code
  2. Delivery
    Acquire victim password out of band
  3. Exploit
    Fail primary TOTP at victim's challenge route
  4. Execution
    Submit attacker's recovery code, user_id coerces to zero
  5. Persist
    Ownership check passes, complete victim 2FA
  6. Impact
    Full 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.

Act Now Prioritize within 24-48h. Why: CRITICAL severity.
No patch listed yet 0.4% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv2 – 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)
v1 Aug 25, 2026 - 22:16

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

Vendor (CNA) PRIMARY 9.8 CRITICAL
AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
vuln.today AI 6.8 MEDIUM

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.

3.1 AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:N
4.0 AV:N/AC:H/AT:N/PR:L/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N

Primary rating from Vendor (CNA).

CVSS VectorVendor

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

Lifecycle Timeline

3
Analysis Updated
Aug 26, 2026 - 20:29 vuln.today
v2 - CVSS changed
CVSS changed
Aug 26, 2026 - 20:23 NVD
9.8 (CRITICAL)
CVE Published
Aug 25, 2026 - 21:52 oss-security
CRITICAL

Description PRE-NVD

Disclosed via oss-security. NVD scoring and full description are pending.

Executive ViewAI

Why It Matters

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.

Business Impact: High
Compensating Controls

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

EPSS Score
0.4%
Top 63% exploitable
Prevalence
Rare
obscure single-author CPAN Perl 2FA plugin, minimal production footprint
Social Media
1
Sightings
Data Quality
5 sources
Confidence: Medium

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.

SignalValue
Severity CRITICAL
CISA KEV No
Public POC No
EPSS 0.4%
Patch available No
Active threat No
Deciding rule
CRITICAL severity
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
Yes
Human Impact
High
Technical Impact
Total

Priority Score

49
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +49
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy