Junglewise Threat Intelligence

CVE-2017-20240: Crypt::PBKDF2 timing attack in password validation

CVE-2017-20240 · Severity: info · CVSS 3.7 · Published 2026-06-12

Executive brief

Crypt::PBKDF2 is a Perl library used to securely hash and verify passwords. Versions prior to 0.261630 are vulnerable to a timing attack during password validation. This could allow an attacker to guess a password or a cryptographic key by measuring the time it takes for the system to reject incorrect attempts, potentially leading to unauthorized account access.

Technical details

The 'validate' function in Crypt::PBKDF2 versions prior to 0.261630 uses Perl's built-in 'eq' operator for string comparison. Because 'eq' is not constant-time and returns early upon finding a mismatch, it creates an observable timing discrepancy (CWE-208). A remote attacker can exploit this by measuring the response time of validation attempts to iteratively guess the correct derived key or password hash. The vulnerability is resolved in version 0.261630 by implementing a constant-time comparison method.

Affected products

  • ARODLAND Crypt::PBKDF2 < 0.261630

Timeline

  • 2017-12-11: other: Pull request submitted to mitigate timing attacks
  • 2026-06-11: patched: Version 0.261630 released with constant-time comparison
  • 2026-06-12: advisory: CVE-2017-20240 published

References