Skip to content
Fencer Vulns
high 8.4

CVE-2024-56406 json

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

published 2025-04-13 18 mo ago modified 2026-06-17 4 mo ago also EUVD-2024-54400

cvss
8.4
version 3.1, CNA
cisa kev
Not listed
not in CISA's catalog
epss
0.5%
EPSS 0.5% chance of exploitation in 30 days, percentile 45%
public exploits
0
none known

Summary

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.

Patch / fix

  • perl perl 5.38.4-RC1, 5.40.2-RC1
  • perl Debian 12 5.36.0-7+deb12u2
  • perl Debian 14, Debian 13 5.40.1-3

debian advisories DEBIAN-CVE-2024-56406

  • perl Ubuntu 22.04 LTS 5.34.0-3ubuntu1.4
  • perl Ubuntu 24.04 LTS 5.38.2-3.2ubuntu0.1

ubuntu advisories UBUNTU-CVE-2024-56406

Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0

  • perl RHEL 10.0 4:5.40.2-512.1.el10_0
  • perl-B RHEL 10.0 1.89-512.1.el10_0
  • perl-if RHEL 10.0 0.61.000-512.1.el10_0
  • perl-IO RHEL 10.0 1.55-512.1.el10_0
  • perl-ph RHEL 10.0 5.40.2-512.1.el10_0
  • perl-lib RHEL 10.0 0.65-512.1.el10_0
  • perl-mro RHEL 10.0 1.29-512.1.el10_0
  • perl-Net RHEL 10.0 1.04-512.1.el10_0

red hat advisories RHSA-2025:7500

  • perl Linux Micro 6.1 5.38.2-slfo.1.1_2.1
  • perl Linux Micro 6.0 5.38.2-2.1

suse advisories SUSE-SU-2025:20532-1SUSE-SU-2025:20334-1

  • perl openSUSE Tumbleweed 5.40.2-1.1

opensuse advisories openSUSE-SU-2025:15003-1

  • perl AlmaLinux 10 4:5.40.2-512.1.el10_0
  • perl-B AlmaLinux 10 1.89-512.1.el10_0
  • perl-if AlmaLinux 10 0.61.000-512.1.el10_0
  • perl-IO AlmaLinux 10 1.55-512.1.el10_0
  • perl-ph AlmaLinux 10 5.40.2-512.1.el10_0
  • perl-lib AlmaLinux 10 0.65-512.1.el10_0
  • perl-mro AlmaLinux 10 1.29-512.1.el10_0
  • perl-Net AlmaLinux 10 1.04-512.1.el10_0

almalinux advisories ALSA-2025:7500

  • perl Rocky Linux 10 4:5.40.2-512.1.el10_0

rocky linux advisories RLSA-2025:7500

  • perl Alpine 3.18 5.36.2-r1
  • perl Alpine 3.20, Alpine 3.19 5.38.3-r1
  • perl Alpine 3.24, Alpine 3.23, Alpine 3.22 +1 more 5.40.1-r1

alpine advisories ALPINE-CVE-2024-56406

Alpine secdb © Alpine Linux, from https://secdb.alpinelinux.org via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0

  • perl CBL-Mariner 2.0 5.34.1-490
  • perl Azure Linux 3.0 5.38.2-507

azure linux advisories AZL-60384AZL-60409

Azure Linux vulnerability data, Copyright (c) Microsoft Corporation, from https://github.com/microsoft/AzureLinuxVulnerabilityData via OSV, under the MIT licence; changed: normalised to fixed package versions per release. MIT

Vendor advisories

What the vendors themselves say about their products: affected, fixed or not affected, and what to do.

red hat product security vex CVE-2024-56406 updated cvss 7.3

perl: Perl 5.34, 5.36, 5.38 and 5.40 are vulnerable to a heap buffer overflow when transliterating non-ASCII bytes

  • Red Hat Enterprise Linux 6 perl, perl-CGI, perl-core, perl-CPAN, perl-libs, perl-parent, +39 more Red Hat Enterprise Linux 7 perl, perl-core, perl-CPAN, perl-libs, perl-tests, perl-macros, +11 more
    affected: no fix planned “Out of support scope”
  • Red Hat Enterprise Linux AppStream (v. 10) perl 5.40.2-512.1.el10_0, perl-B 1.89-512.1.el10_0, perl-IO 1.55-512.1.el10_0, perl-Tie 4.6-512.1.el10_0, perl-lib 0.65-512.1.el10_0, perl-mro 1.29-512.1.el10_0, +92 more
    fixed: vendor fix RHSA-2025:7500
  • Red Hat Enterprise Linux 8 perl, perl-IO, perl-libs, perl-open, perl-Test, perl-Errno, +19 more Red Hat Enterprise Linux 9 perl, perl-B, perl-if, perl-IO, perl-ph, perl-lib, +92 more Red Hat OpenShift Container Platform 4 openshift/ose-rhel-coreos-8, openshift/ose-rhel-coreos-9
    not affected: vulnerable code not present

Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf

CISA SSVC

Exploitation
none
Automatable
no
Technical impact
total
Assessed
12 mo ago

Exploit prediction

0.54% chance of exploitation in the next 30 days, higher than 45% of all scored CVEs (FIRST EPSS, 2026-11-08).

CVSS scores

assigned by version score vector
CISA ADP 3.1 8.4 CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
CNA 3.1 8.4 CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Affected products

  • perl perl

Classification

Weakness

References

Sources

Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.

CPEs and fixed versions use Anchore's correction of NVD's data: Added CPE configurations because not yet analyzed by NVD.