CVE-2024-56406

Perl is vulnerable to a heap buffer overflow when transliterating non-ASCII bytes

Description

A heap buffer overflow vulnerability was discovered in Perl. Release branches 5.34, 5.36, 5.38 and 5.40 are affected, including development versions from 5.33.1 through 5.41.10. When there are non-ASCII bytes in the left-hand-side of the `tr` operator, `S_do_trans_invmap` can overflow the destination pointer `d`.    $ perl -e '$_ = "\x{FF}" x 1000000; tr/\xFF/\x{100}/;'    Segmentation fault (core dumped) It is believed that this vulnerability can enable Denial of Service and possibly Code Execution attacks on platforms that lack sufficient defenses.

Remediation

Solution:

  • Users should update perl to 5.40.2 or 5.38.4, or apply the upstream patch provided in the References section.

Categories

8.6
CVSS
Severity: High
CVSS 3.1 •
EPSS 0.21%
Affected: perl perl
Published at:
Updated at:

References

Frequently Asked Questions

What is the severity of CVE-2024-56406?
CVE-2024-56406 has been scored as a high severity vulnerability.
How to fix CVE-2024-56406?
To fix CVE-2024-56406: Users should update perl to 5.40.2 or 5.38.4, or apply the upstream patch provided in the References section.
Is CVE-2024-56406 being actively exploited in the wild?
As for now, there are no information to confirm that CVE-2024-56406 is being actively exploited. According to its EPSS score, there is a ~0% probability that this vulnerability will be exploited by malicious actors in the next 30 days.
What software or system is affected by CVE-2024-56406?
CVE-2024-56406 affects perl perl.
This platform uses data from the NIST NVD, MITRE CVE, MITRE CWE, First.org and CISA KEV but is not endorsed or certified by these entities. CVE is a registred trademark of the MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. CWE is a registred trademark of the MITRE Corporation and the authoritative source of CWE content is MITRE's CWE web site.
© 2025 Under My Watch. All Rights Reserved.