Punk::Plugin::TOTP versions before 0.05 for Perl accept another account's recovery code at the two-factor challenge because totp_use_recovery compares user identifiers numerically
Summary
| CVE | CVE-2026-78619 |
|---|---|
| State | PUBLISHED |
| Assigner | CPANSec |
| Source Priority | CVE Program / NVD first with legacy fallback |
| Published | 2026-08-25 22:17:06 UTC |
| Updated | 2026-08-25 23:17:59 UTC |
| Description | Punk::Plugin::TOTP versions before 0.05 for Perl accept another account's recovery code at the two-factor challenge because totp_use_recovery compares user identifiers numerically. The helper searches the recovery model for the submitted code's digest alone, across every user's rows, so the ownership test that follows is the only thing binding a code to the account it was issued to. That test compares the row's user_id with the challenged user's id through Perl's integer coercion, and an identifier with no leading digits coerces to zero, so any two of them compare equal. User models keyed on a username, an email address or a UUID hit that case, and a numeric key compares as intended. The challenge route feeds a submitted value to the helper once TOTP verification fails, so an attacker who knows a victim's password and holds a recovery code of their own passes the victim's second factor. |
Risk And Classification
Problem Types: CWE-305 | CWE-1025 | CWE-305 CWE-305 Authentication Bypass by Primary Weakness | CWE-1025 CWE-1025 Comparison Using Wrong Factors
There are no known software configurations currently associated with this CVE in NVD or the CVE Program record.
References
| Reference | Source | Link | Tags |
|---|---|---|---|
| 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 | |
| www.openwall.com/lists/oss-security/2026/08/25/6 | af854a3a-2127-422b-91ae-364da2661108 | www.openwall.com | |
| metacpan.org/release/LNATION/Punk-TOTP-0.04/source/include/ptotp/ptotp_plu... | 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 |
No vendor comments have been submitted for this CVE.
Additional Advisory Data
Solutions
CNA: Upgrade to Punk-TOTP 0.05 or later.
Workarounds
CNA: For deployments that cannot upgrade to 0.05, stop issuing recovery codes and delete the existing totp_recovery rows from the token table. The challenge route then has nothing to match and the second factor rests on TOTP codes alone.
There are currently no legacy QID mappings associated with this CVE.