CVE Catalog

CVE-2026-80490

Low risk· EPSS 10%
Published: Updated: Translated: NVD NIST

Exploitation Probability (EPSS)

Low risk
0.21%

10th percentile - higher than 10% of all known CVEs

Summary

In Algorithm::AhoCorasick::XS for Perl versions through 0.04, the haystack string length is read before the scalar is stringified. The matches, first_match and match_details methods use the T_STD_STRING typemap, which for references, integers (IVs) or floats (NVs) can lead to an out-of-bounds read and process abort. This can be triggered when the haystack is a numeric value, e.g., from decoded JSON or a numeric database column.

Risk Assessment

The vulnerability may cause process crashes or potential memory disclosure, which could be exploited for DoS attacks or data leaks.

Recommendation

It is recommended to update Algorithm::AhoCorasick::XS to a version newer than 0.04 or avoid passing numeric values as haystack.

Related vulnerabilities

Original NVD description (English source)

Algorithm::AhoCorasick::XS versions through 0.04 for Perl read the haystack string length before the scalar is stringified. The matches, first_match and match_details methods use the T_STD_STRING typemap to translate Perl scalars (SVs) into strings via the std::string constructor, using the SvPV macro to stringify the haystack input, and the SvCUR macro to determine the length of the SV. When the input SVs are references, integers (IVs) or floats (NVs), the SvCUR macro will return an invalid length if it is run before the input is stringified, leading to an out-of-bounds read which can abort the process. Note that the evaluation order of arguments to std::string is unspecified. Depending on the compiler, SvCUR may be run first and lead to an abort that cannot be caught within Perl. This can be triggered when the haystack is a numeric value, for example, my $ac = Algorithm::AhoCorasick::XS->new( [ "11", "22" ] ); $ac->matches( 211 ); This can occur when the haystack is the result of reading data from decoded JSON or a numeric database column. It can also be triggered when using a blessed object as a haystack.

Vulnerability data from NVD (NIST) · CISA KEV · EPSS