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.
{
"license": "CC-BY-4.0",
"sources": [
{
"affected": {
"perl:perl": [
">= 5.33.1, < 5.38.4",
">= 5.39.0, < 5.40.2",
">= 5.41.0, <= 5.41.10"
]
},
"database_specific": {
"status": "Modified"
},
"html_url": "https://nvd.nist.gov/vuln/detail/CVE-2024-56406",
"id": "CVE-2024-56406",
"imported": "2026-11-21T08:11:19.204Z",
"modified": "2026-06-17T08:12:08.977Z",
"published": "2025-04-13T14:15:14.527Z",
"url": "https://services.nvd.nist.gov/rest/json/cves/2.0?cveId=CVE-2024-56406"
},
{
"html_url": "https://github.com/advisories/GHSA-p6jf-pv8c-623c",
"id": "GHSA-p6jf-pv8c-623c",
"imported": "2026-11-21T08:11:35.988Z",
"modified": "2025-04-30T15:30:47Z",
"published": "2025-04-13T15:30:21Z",
"url": "https://api.github.com/advisories/GHSA-p6jf-pv8c-623c"
},
{
"affected": {
"perl:perl": [
"5.33.1 <5.38.4-RC1",
"5.39.0 <5.40.2-RC1",
"5.41.0 ≤5.41.10"
]
},
"html_url": "https://euvd.enisa.europa.eu/vulnerability/EUVD-2024-54400",
"id": "EUVD-2024-54400",
"imported": "2026-11-21T08:11:20.572Z",
"modified": "2025-10-16T14:04:20Z",
"published": "2025-04-13T13:16:09Z",
"url": "https://euvdservices.enisa.europa.eu/api/enisaid?id=EUVD-2024-54400"
}
]
}