Description
Crypt::Argon2 versions from 0.017 before 0.031 for Perl perform a heap out-of-bounds read in argon2_verify on empty encoded input.

The auto-detect form of argon2_verify passes encoded_len - 1 as the length argument to memchr without checking that encoded_len is non-zero. When the encoded string is empty, the size_t subtraction underflows to SIZE_MAX and memchr scans adjacent heap memory looking for a '$' separator byte.

A caller that invokes argon2_verify against a stored hash that may legitimately be empty (for example a placeholder row or a NULL column materialised as an empty string) reads out-of-bounds heap memory, which can crash the process or leak the position of an adjacent '$' byte into subsequent parsing.
Published: 2026-05-13
Score: 5.3 Medium
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

Crypt::Argon2, in versions 0.017 through 0.030, performs an out-of-bounds heap read when the verify function receives an empty encoded string. The function passes a size_t value of encoded_len-1 to memchr without checking that encoded_len is non-zero. When the encoded string is empty, the subtraction wraps to the maximum unsigned value, causing memchr to scan adjacent heap memory for the delimiter byte. The attacker can therefore trigger a crash or obtain the location of a nearby '$' byte, potentially leaking information. This flaw corresponds to CWE-126 and CWE-191.

Affected Systems

The vulnerability affects the Perl module Crypt::Argon2, distributed under the name LEONT:Crypt::Argon2. All releases from version 0.017 up to (but not including) 0.031 are affected. The module is commonly used to hash and verify passwords for Perl applications. Applying the official patch is necessary to obtain a fixed version.

Risk and Exploitability

The danger is limited to environments where the application can supply an empty hash string to the verify routine. An attacker who can influence stored hash values or the input string can cause the process to crash, resulting in a denial of service, or can read adjacent heap locations, which may reveal sensitive data only if the memory pattern is interpretable. No remote exploitation vector is described, and the vulnerability is not listed in KEV. EPSS is unavailable, making it hard to quantify exploitation likelihood; however, the absence of a known exploit and the local character of the fault suggest a moderate risk, primarily affecting systems that rely on the vulnerable module without guarding against empty inputs.

Generated by OpenCVE AI on May 13, 2026 at 19:56 UTC.

Remediation

Vendor Solution

Upgrade to Crypt-Argon2 0.031 or later.


OpenCVE Recommended Actions

  • Upgrade Crypt-Argon2 to version 0.031 or later to eliminate the heap out-of-bounds read.
  • Validate that the encoded hash string is non-empty before invoking argon2_verify, or skip verification when the string is empty.
  • Implement defensive error handling for unexpected crashes or memory reads, and monitor application logs for indications of OOB access.

Generated by OpenCVE AI on May 13, 2026 at 19:56 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Thu, 14 May 2026 15:00:00 +0000

Type Values Removed Values Added
First Time appeared Leont crypt::argon2
Vendors & Products Leont crypt::argon2

Wed, 13 May 2026 19:30:00 +0000

Type Values Removed Values Added
First Time appeared Leont
Leont crypt\
CPEs cpe:2.3:a:leont:crypt\:\:argon2:*:*:*:*:*:perl:*:*
Vendors & Products Leont
Leont crypt\

Wed, 13 May 2026 18:30:00 +0000

Type Values Removed Values Added
Metrics cvssV3_1

{'score': 5.3, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L'}

ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Wed, 13 May 2026 17:30:00 +0000

Type Values Removed Values Added
References

Wed, 13 May 2026 13:15:00 +0000

Type Values Removed Values Added
Description Crypt::Argon2 versions from 0.017 before 0.031 for Perl perform a heap out-of-bounds read in argon2_verify on empty encoded input. The auto-detect form of argon2_verify passes encoded_len - 1 as the length argument to memchr without checking that encoded_len is non-zero. When the encoded string is empty, the size_t subtraction underflows to SIZE_MAX and memchr scans adjacent heap memory looking for a '$' separator byte. A caller that invokes argon2_verify against a stored hash that may legitimately be empty (for example a placeholder row or a NULL column materialised as an empty string) reads out-of-bounds heap memory, which can crash the process or leak the position of an adjacent '$' byte into subsequent parsing.
Title Crypt::Argon2 versions from 0.017 before 0.031 for Perl perform a heap out-of-bounds read in argon2_verify on empty encoded input
Weaknesses CWE-126
CWE-191
References

Subscriptions

Leont Crypt::argon2 Crypt\
cve-icon MITRE

Status: PUBLISHED

Assigner: CPANSec

Published:

Updated: 2026-05-13T17:19:27.434Z

Reserved: 2026-05-13T11:08:17.272Z

Link: CVE-2026-8463

cve-icon Vulnrichment

Updated: 2026-05-13T16:53:38.661Z

cve-icon NVD

Status : Analyzed

Published: 2026-05-13T14:18:17.140

Modified: 2026-05-13T19:23:38.790

Link: CVE-2026-8463

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-05-14T14:34:32Z

Weaknesses