CVE-2024-56406
CVE-2024-56406 · Perl is vulnerable to a heap buffer overflow when transliterating non-ASCII bytes
CVSS 8.4 · High · EPSS 0.5% · Fix available
Compare with your installed version
Affected products and known fixed versions are public information. Compare them with your installed version.
- perlUpdate to 5.38.4-RC1 / 5.40.2-RC1
- perl Alpine 3.18Update to 5.36.2-r1
- perl Alpine 3.19Update to 5.38.3-r1
- perl Alpine 3.20Update to 5.38.3-r1
- and 9 more
Check the installed version:
apk list -I -o perlAssess your server’s risks
The free check gives you a rating and a risk summary by technology stack, without signing up. It does not answer whether this particular vulnerability affects you.
Monitoring matches public information against your servers’ software. Detailed findings for your servers include the order of updates.
curl -fsSL https://patchfirst.dev/check.sh | shChannels carry general technology news; monitoring reports new findings on your servers in your dashboard, through browser notifications, in Telegram or via a webhook.
This page contains facts from public vulnerability sources. Check the original advisory before updating.
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.
- Published
- Updated
Fixes in distributions
- RLSA-2025:7500 · Rocky Linux 10 ·
- SUSE-SU-2025:20532-1 · SUSE Linux Micro 6.1 ·
- SUSE-SU-2025:20334-1 · SUSE Linux Micro 6.0 ·
- RHSA-2025:7500 · Red Hat Enterprise Linux 10.0 ·
- ALSA-2025:7500 · AlmaLinux 10 ·
- USN-7434-2 · Ubuntu 25.04 ·
- openSUSE-SU-2025:15003-1 · openSUSE Tumbleweed ·
- USN-7434-1 · Ubuntu 22.04 LTS, Ubuntu 24.04 LTS ·
- DSA-5902-1 · Debian 12 ·
Stack: system
Affected products and versions
perl
- Versions
- ≥ 5.41.0, ≤ 5.41.10: Affected (custom)
- ≥ 5.39.0, < 5.40.2-RC1: Affected (custom)
- ≥ 5.33.1, < 5.38.4-RC1: Affected (custom)
Update to 5.38.4-RC1; Update to 5.40.2-RC1
perl Alpine 3.18
- Affected ranges
- ECOSYSTEM: ≥ 5.33.1, < 5.36.2-r1
Update to 5.36.2-r1
perl Alpine 3.19
- Affected ranges
- ECOSYSTEM: ≥ 5.33.1, < 5.38.3-r1
Update to 5.38.3-r1
perl Alpine 3.20
- Affected ranges
- ECOSYSTEM: ≥ 5.33.1, < 5.38.3-r1
Update to 5.38.3-r1
perl Alpine 3.21
- Affected ranges
- ECOSYSTEM: ≥ 5.39.0, < 5.40.1-r1
Update to 5.40.1-r1
perl Alpine 3.22
- Affected ranges
- ECOSYSTEM: ≥ 5.39.0, < 5.40.1-r1
Update to 5.40.1-r1
perl Alpine 3.23
- Affected ranges
- ECOSYSTEM: ≥ 5.39.0, < 5.40.1-r1
Update to 5.40.1-r1
perl Alpine 3.24
- Affected ranges
- ECOSYSTEM: ≥ 5.39.0, < 5.40.1-r1
Update to 5.40.1-r1
perl Debian 12
- Versions
- 5.36.0-7
- 5.36.0-7+deb12u1
- Affected ranges
- ECOSYSTEM: < 5.36.0-7+deb12u2
Update to 5.36.0-7+deb12u2
perl Debian 13
- Affected ranges
- ECOSYSTEM: < 5.40.1-3
Update to 5.40.1-3
perl Debian 14
- Affected ranges
- ECOSYSTEM: < 5.40.1-3
Update to 5.40.1-3
perl Ubuntu 22.04 LTS
- Versions
- 5.32.1-3ubuntu3
- 5.34.0-3ubuntu1
- 5.34.0-3ubuntu1.1
- 5.34.0-3ubuntu1.2
- 5.34.0-3ubuntu1.3
- Affected ranges
- ECOSYSTEM: < 5.34.0-3ubuntu1.4
Update to 5.34.0-3ubuntu1.4
perl Ubuntu 24.04 LTS
- Versions
- 5.36.0-9ubuntu1
- 5.36.0-10ubuntu1
- 5.38.2-3
- 5.38.2-3.2
- 5.38.2-3.2build1
- 5.38.2-3.2build2
All versions (7)
- 5.38.2-3.2build2.1
- Affected ranges
- ECOSYSTEM: < 5.38.2-3.2ubuntu0.1
Update to 5.38.2-3.2ubuntu0.1
Original sources
- https://github.com/Perl/perl5/commit/87f42aa0e0096e9a346c9672aa3a0bd3bef8c1dd.patch
- https://metacpan.org/release/SHAY/perl-5.38.4/changes
- https://metacpan.org/release/SHAY/perl-5.40.2/changes
- http://www.openwall.com/lists/oss-security/2025/04/13/3
- http://www.openwall.com/lists/oss-security/2025/04/13/4
- http://www.openwall.com/lists/oss-security/2025/04/13/5
- https://nvd.nist.gov/vuln/detail/CVE-2024-56406