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

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
High
Privileges required
Low
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
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