# CVE-2026-78619: 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

- Severity: Critical 9.8 (CVSS:3.1, scored by CISA-ADP) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.62%, higher than 44% of CVEs (2026-11-30)
- Published: 2026-08-25T21:21:08.073Z
- Modified: 2026-08-26T20:18:02.843Z
- Weaknesses: CWE-305, CWE-1025
- SSVC (CISA-ADP): exploitation none, automatable yes, technical impact total
- Assigned by: CPANSec

## 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.

(As written by CVE List.)

## Affected

- Punk-TOTP: before 0.05

## References

- <https://metacpan.org/release/LNATION/Punk-TOTP-0.04/source/include/ptotp/ptotp_plugin.h#L801-827> (technical-description)
- <https://metacpan.org/release/LNATION/Punk-TOTP-0.04/view/lib/Punk/Plugin/TOTP.pm> (technical-description)
- <https://metacpan.org/release/LNATION/Punk-TOTP-0.05/source/Changes> (release-notes)
- <http://www.openwall.com/lists/oss-security/2026/08/25/6>

## Sources

- CVE List: [CVE-2026-78619](https://www.cve.org/CVERecord?id=CVE-2026-78619), CVE Terms of Use, modified 2026-08-26
- NVD: [CVE-2026-78619](https://nvd.nist.gov/vuln/detail/CVE-2026-78619), Public domain, modified 2026-08-26

---

Page: https://cve.day/CVE-2026-78619 · Whole record: https://cve.day/CVE-2026-78619.json · Rebuilt by cve.day 2026-11-25T22:59:35.314Z
