Timing attack vulnerability in token comparison

Created on 26 March 2024, 8 months ago
Updated 11 April 2024, 7 months ago

Problem/Motivation

This module has a timing attack vulnerability when comparing security tokens.

Reported by klausi and patch provided in the private Security issue queue. This is deemed a security hardening measure and can be fixed publicly.

Steps to reproduce

You can see this vulnerability by:
1. Enabling the module
2. Create a saved search for an anonymous user
3. Entity operations such as activate use a URL token. An attacker can try to brute force the token with a timing attack, as the token comparison does not use the timing-safe hash_equals() function.

This affects both the Drupal 7 and Drupal 10 version of the module.

Proposed resolution

Use hash_equals() to compare the values.
@klausi provided the patch attached

🐛 Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

🇮🇪Ireland stella

Live updates comments and jobs are added and updated live.
  • Security improvements

    It makes Drupal less vulnerable to abuse or misuse. Note, this is the preferred tag, though the Security tag has a large body of issues tagged to it. Do NOT publicly disclose security vulnerabilities; contact the security team instead. Anyone (whether security team or not) can apply this tag to security improvements that do not directly present a vulnerability e.g. hardening an API to add filtering to reduce a common mistake in contributed modules.

Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024