Vulnerability · Published Jun 15, 2026 · Assigned by CPANSec

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

Critical 9.1

In plain English

A critical-severity out-of-bounds read in Socket from PEVANS. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.6% (higher than 48% of all known vulnerabilities). Ready-made attack tooling exists: public proof-of-concept code. Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)9.1Critical
Exploit odds (30 days)0.6%top 52.4% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack tooling1Public PoC

Official 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 packages & fixed versions

EcosystemPackageFixed inAdvisory
Alpine:v3.24perl5.42.3-r0ALPINE-CVE-2026-12087
Debian:12libsocket-perlno fix listedDEBIAN-CVE-2026-12087
Debian:13libsocket-perl2.038-1+deb13u1DEBIAN-CVE-2026-12087
Debian:14libsocket-perl2.041-1DEBIAN-CVE-2026-12087
Debian:12perl5.36.0-7+deb12u4DEBIAN-CVE-2026-12087
Debian:13perl5.40.1-6+deb13u1DEBIAN-CVE-2026-12087
Debian:14perl5.42.3-1DEBIAN-CVE-2026-12087
Ubuntu:22.04:LTSlibsocket-perlno fix listedUBUNTU-CVE-2026-12087
Ubuntu:24.04:LTSlibsocket-perlno fix listedUBUNTU-CVE-2026-12087
Ubuntu:25.10libsocket-perlno fix listedUBUNTU-CVE-2026-12087
Ubuntu:26.04:LTSlibsocket-perlno fix listedUBUNTU-CVE-2026-12087
Ubuntu:26.10libsocket-perlno fix listedUBUNTU-CVE-2026-12087
Ubuntu:22.04:LTSperl5.34.0-3ubuntu1.8USN-8675-1
Ubuntu:22.04:LTSperl5.34.0-3ubuntu1.8UBUNTU-CVE-2026-12087
Ubuntu:24.04:LTSperl5.38.2-3.2ubuntu0.4UBUNTU-CVE-2026-12087
Ubuntu:24.04:LTSperl5.38.2-3.2ubuntu0.4USN-8684-1
Ubuntu:25.10perlno fix listedUBUNTU-CVE-2026-12087
Ubuntu:26.04:LTSperl5.40.1-7ubuntu0.3USN-8675-2
Ubuntu:26.04:LTSperl5.40.1-7ubuntu0.3UBUNTU-CVE-2026-12087

Affected products (as reported)

VendorProductVersions
PEVANS Socket 0 – before 2.041

Weakness: CWE-125, CWE-805 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H

References