{"id":"CVE-2024-56406","published":"2025-04-13T13:16:09Z","modified":"2025-10-16T14:04:20Z","title":"Perl is vulnerable to a heap buffer overflow when transliterating non-ASCII bytes","vendor":"perl","product":"perl","tier":"tail","description":{"text":"A heap buffer overflow vulnerability was discovered in Perl. \n\nRelease branches 5.34, 5.36, 5.38 and 5.40 are affected, including development versions from 5.33.1 through 5.41.10.\n\nWhen there are non-ASCII bytes in the left-hand-side of the `tr` operator, `S_do_trans_invmap` can overflow the destination pointer `d`.\n\n   $ perl -e '$_ = \"\\x{FF}\" x 1000000; tr/\\xFF/\\x{100}/;' \n   Segmentation fault (core dumped)\n\nIt is believed that this vulnerability can enable Denial of Service and possibly Code Execution attacks on platforms that lack sufficient defenses.","provenance":"source","from":"CVE.org"},"cvss":{"score":8.4,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","provenance":"source","from":"CISA ADP Vulnrichment"},"epss":{"score":0.00514,"percentile":0.37037,"provenance":"source"},"cwes":[{"id":"CWE-122","name":"Heap-based Buffer Overflow"},{"id":"CWE-787","name":"Out-of-bounds Write"}],"references":[{"url":"https://github.com/Perl/perl5/commit/87f42aa0e0096e9a346c9672aa3a0bd3bef8c1dd.patch","tags":["patch"]},{"url":"https://metacpan.org/release/SHAY/perl-5.38.4/changes","tags":["release-notes"]},{"url":"https://metacpan.org/release/SHAY/perl-5.40.2/changes","tags":["release-notes"]},{"url":"http://www.openwall.com/lists/oss-security/2025/04/13/3","tags":[]},{"url":"http://www.openwall.com/lists/oss-security/2025/04/13/4","tags":[]},{"url":"http://www.openwall.com/lists/oss-security/2025/04/13/5","tags":[]}],"priority":{"score":13.3,"factors":[{"name":"EPSS percentile","points":7.41},{"name":"CVSS severity","points":5.88}]},"vendorSlug":"perl","affectedVersions":[{"vendor":"perl","product":"perl","versions":[">= 5.41.0, <= 5.41.10",">= 5.39.0, < 5.40.2-RC1",">= 5.33.1, < 5.38.4-RC1"]}],"solutions":{"items":["Users should update perl to 5.40.2 or 5.38.4, or apply the upstream patch provided in the References section."],"from":"CVE.org CNA","provenance":"source"},"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"total","timestamp":"2025-10-16T14:04:16.993103Z","from":"CISA ADP","provenance":"source"},"euvd":{"id":"EUVD-2024-54400","exploited":false,"provenance":"source"}}