Skip to content
OpenAdvisories
Critical · 9.1 Public exploit CVE-2026-12087 EUVD-2026-37009GHSA-q5cv-5vf6-95gp

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

Published Jun 15, 2026 · Updated Nov 10, 2026 · Assigned by CPANSec

Description

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.

Affected products

VendorProductAffectedFixed
PEVANS Socket < 2.041 2.041

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 libsocket-perl 2.041-1 —
Debian 14 perl 5.42.3-1 —
Debian 13 libsocket-perl 2.038-1+deb13u1 —
Debian 13 perl 5.40.1-6+deb13u1 —
Debian 12 libsocket-perl No fix yet —
Debian 12 perl 5.36.0-7+deb12u4 —
ReleasePackageFixed inAdvisory
Ubuntu 26.10 libsocket-perl No fix yet —
Ubuntu 26.04 LTS libsocket-perl No fix yet —
Ubuntu 26.04 LTS perl 5.40.1-7ubuntu0.3 USN-8675-2
Ubuntu 25.10 perl +1 No fix yet —
Ubuntu 24.04 LTS libsocket-perl No fix yet —
Ubuntu 24.04 LTS perl 5.38.2-3.2ubuntu0.4 USN-8684-1
Ubuntu 22.04 LTS libsocket-perl No fix yet —
Ubuntu 22.04 LTS perl 5.34.0-3ubuntu1.8 USN-8675-1
Show 7 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Ubuntu 20.04 LTS libsocket-perl No fix yet —
Ubuntu 18.04 LTS libsocket-perl No fix yet —
Ubuntu 16.04 LTS libsocket-perl No fix yet —
Ubuntu Pro 20.04 LTS perl 5.30.0-9ubuntu0.5+esm3 USN-8675-1
Ubuntu Pro 18.04 LTS perl 5.26.1-6ubuntu0.7+esm3 USN-8675-1
Ubuntu Pro 16.04 LTS perl 5.22.1-9ubuntu0.9+esm3 USN-8675-1
Ubuntu Pro 14.04 LTS perl 5.18.2-2ubuntu1.7+esm8 USN-8675-1
ReleasePackageFixed inAdvisory
Red Hat Hardened Images 1 perl-Socket +1 2.041-1.hum1 RHSA-2026:11342
ReleasePackageFixed inAdvisory
SLES 15 SP7 perl 5.26.1-150300.17.23.1 SUSE-SU-2026:3558-1
SLES 15 SP6 perl 5.26.1-150300.17.23.1 SUSE-SU-2026:3558-1
SLES 15 SP5 perl 5.26.1-150300.17.23.1 SUSE-SU-2026:3558-1
SLES 15 SP4 perl 5.26.1-150300.17.23.1 SUSE-SU-2026:3558-1
SLES 12 SP5 perl 5.18.2-12.35.1 SUSE-SU-2026:3540-1
Show 13 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
SLES for SAP 16.0 perl 5.42.0-160000.3.1 SUSE-SU-2026:22847-1
SLES for SAP 15 SP6 perl 5.26.1-150300.17.23.1 SUSE-SU-2026:3558-1
SLES for SAP 15 SP5 perl 5.26.1-150300.17.23.1 SUSE-SU-2026:3558-1
SLES for SAP 15 SP4 perl 5.26.1-150300.17.23.1 SUSE-SU-2026:3558-1
SLES 16.0 perl 5.42.0-160000.3.1 SUSE-SU-2026:22847-1
SLE Micro 6.2 perl 5.42.0-160000.3.1 SUSE-SU-2026:22929-1
SLE Micro 6.1 perl 5.38.2-slfo.1.1_3.1 SUSE-SU-2026:23075-1
SLE Micro 6.0 perl 5.38.2-5.1 SUSE-SU-2026:23008-1
SLE Micro 5.5 perl 5.26.1-150300.17.23.1 SUSE-SU-2026:3558-1
SLE Micro 5.4 perl 5.26.1-150300.17.23.1 SUSE-SU-2026:3558-1
SLE Micro 5.3 perl 5.26.1-150300.17.23.1 SUSE-SU-2026:3558-1
SLE HPC 15 SP5 perl 5.26.1-150300.17.23.1 SUSE-SU-2026:3558-1
SLE HPC 15 SP4 perl 5.26.1-150300.17.23.1 SUSE-SU-2026:3558-1
ReleasePackageFixed inAdvisory
openSUSE Leap 16.0 perl 5.42.0-160000.3.1 openSUSE-SU-2026:21411-1
ReleasePackageFixed inAdvisory
Alpine v3.24 perl 5.42.3-r0 —

Amazon Linux

ReleasePackageFixed inAdvisory
Amazon Linux 2023 perl-Socket +1 4:2.032-1.amzn2023.0.4 ALAS2023-2026-2161

Azure Linux

ReleasePackageFixed inAdvisory
Azure Linux 3 perl 5.38.2-512 —

Public exploits

Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.

Third-party code, not reviewed by us. Public PoCs are sometimes fake or contain malware. Read the code first and run it only in an isolated lab, against systems you are authorised to test.

GitHub 1 repository

Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.

Advisories 15

References