Skip to content

[Dev Beta] Multiple OTP issues

High
glenn-sorrentino published GHSA-4c38-hhxx-9mhx Jun 25, 2024

Package

Hush Line

Affected versions

Dev Beta

Patched versions

Dev Beta

Description

Summary

The TOTP authentication flow has multiple issues that weakens its one-time nature.

Details

The issues include:

  • OTPs are reusable in their time window
  • OTPs tentatives are unlimited, even within the same session
  • Security settings such as disabling the OTP and changing the GPG key do not require the OTP

PoC

There is application-wide rate limiting. However it is IP based and not account-based, so not really a protection against OTP bruteforces.

Pretty generous IP-based rate-limiting

@limiter.limit("120 per minute")

totp.verify invoked directly on user input, without checking the number of attempts per-user and without checking for reuse.

if totp.verify(verification_code):

Impact

Authentication is weakened. Specifically, the lack of 2fa authentication for changing security settings allows attacker with CSRF or XSS primitives to change such settings without user interaction, as mentioned the other reports12.

Note that: attack complexity is high as credentials are required.

Footnotes

  1. GHSA-r85c-95x7-4h7q

  2. GHSA-4v8c-r6h2-fhh3

Severity

High
7.5
/ 10

CVSS base metrics

Attack vector
Network
Attack complexity
High
Privileges required
Low
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H

CVE ID

CVE-2024-38523

Weaknesses

Credits