CVEfocus › CVE database › CVE-2026-12087

CVE-2026-12087Socket versions before 2.041 for Perl have an out-of-bounds heap read

CVSS 9.1 CriticalEPSS 0.7% (higher than 46% of CVEs)Published 2026-06-15Updated 2026-11-10Assigner: CPANSec

Socket versions before 2.041 for Perl have an out-of-bounds heap read. In Socket.xs, pack_ip_mreq_source() checks the length of its source argument before the argument is read, so the check tests the byte length carried over from the preceding multiaddr argument instead. Both addresses occupy a 4-byte field, so a valid multiaddr lets a source of any length pass the check, and the source is then copied into the 4-byte imr_sourceaddr field with a fixed-size copy. A source shorter than 4 bytes is not rejected, and the copy reads up to 3 bytes past the end of its buffer. Calling pack_ip_mreq_source() with a source value shorter than 4 bytes copies adjacent heap memory into the returned packed structure.

CWE-125CWE-805

What to do

Fixed builds are available from Alpine, Debian, Ubuntu: see the table below for the fixed version per release.

Debian, Red Hat, Ubuntu have not shipped a fix for every release yet.

Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.

curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \
  -H "Content-Type: text/plain" --data-binary @inventory.txt

Vendor status at a glance

9Fixed
18Fix pending
5Will not fix

Status by vendor and release

From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 26.10libsocket-perlFix pendingUBUNTU-CVE-2026-12087
Ubuntu 26.04libsocket-perlFix pendingUBUNTU-CVE-2026-12087
Ubuntu 26.04perlFixed5.40.1-7ubuntu0.3UBUNTU-CVE-2026-12087
Ubuntu 25.10libsocket-perlWill not fix
Ubuntu decided not to fix this in this release
UBUNTU-CVE-2026-12087
Ubuntu 25.10perlWill not fix
Ubuntu decided not to fix this in this release
UBUNTU-CVE-2026-12087
Ubuntu 24.04libsocket-perlFix pendingUBUNTU-CVE-2026-12087
Ubuntu 24.04perlFixed5.38.2-3.2ubuntu0.4UBUNTU-CVE-2026-12087
Ubuntu 22.04libsocket-perlFix pendingUBUNTU-CVE-2026-12087
Ubuntu 22.04perlFixed5.34.0-3ubuntu1.8UBUNTU-CVE-2026-12087
Ubuntu 20.04libsocket-perlFix pendingUBUNTU-CVE-2026-12087
Ubuntu 20.04perlFix pending5.30.0-9ubuntu0.5+esm3 (Ubuntu Pro)UBUNTU-CVE-2026-12087
Ubuntu 18.04libsocket-perlFix pendingUBUNTU-CVE-2026-12087
Ubuntu 18.04perlFix pending5.26.1-6ubuntu0.7+esm3 (Ubuntu Pro)UBUNTU-CVE-2026-12087
Ubuntu 16.04libsocket-perlFix pendingUBUNTU-CVE-2026-12087
Ubuntu 16.04perlFix pending5.22.1-9ubuntu0.9+esm3 (Ubuntu Pro)UBUNTU-CVE-2026-12087
Ubuntu 14.04perlFix pending5.18.2-2ubuntu1.7+esm8 (Ubuntu Pro)UBUNTU-CVE-2026-12087
Debian 14libsocket-perlFixed2.041-1DEBIAN-CVE-2026-12087
Debian 14perlFixed5.42.3-1DEBIAN-CVE-2026-12087
Debian 13libsocket-perlFixed2.038-1+deb13u1DEBIAN-CVE-2026-12087
Debian 13perlFixed5.40.1-6+deb13u1DEBIAN-CVE-2026-12087
Debian 12libsocket-perlFix pendingDEBIAN-CVE-2026-12087
Debian 12perlFixed5.36.0-7+deb12u4DEBIAN-CVE-2026-12087
Red Hat Enterprise Linux 10perl-SocketFix pending
Fix deferred
Red Hat Enterprise Linux 10perl-Socket6Fix pending
Fix deferred
Red Hat Enterprise Linux 9perl-SocketFix pending
Fix deferred
Red Hat Enterprise Linux 9perl-Socket6Fix pending
Fix deferred
Red Hat Enterprise Linux 8perl-SocketFix pending
Fix deferred
Red Hat Enterprise Linux 8perl-Socket6Fix pending
Fix deferred
Red Hat Enterprise Linux 7perl-SocketWill not fix
Out of support scope
Red Hat Enterprise Linux 7perl-Socket6Will not fix
Out of support scope
Red Hat Enterprise Linux 6perl-Socket6Will not fix
Out of support scope
Alpine Linux 3.24perlFixed5.42.3-r0ALPINE-CVE-2026-12087

What the vendor says

As published in the CVE record by CPANSec, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.

Solution: Upgrade to version 2.041 or later.

Vendor advisories:

References

About this page

Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.