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.
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
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Alpine:v3.24 | perl | 5.42.3-r0 | ALPINE-CVE-2026-12087 |
| Debian:12 | libsocket-perl | no fix listed | DEBIAN-CVE-2026-12087 |
| Debian:13 | libsocket-perl | 2.038-1+deb13u1 | DEBIAN-CVE-2026-12087 |
| Debian:14 | libsocket-perl | 2.041-1 | DEBIAN-CVE-2026-12087 |
| Debian:12 | perl | 5.36.0-7+deb12u4 | DEBIAN-CVE-2026-12087 |
| Debian:13 | perl | 5.40.1-6+deb13u1 | DEBIAN-CVE-2026-12087 |
| Debian:14 | perl | 5.42.3-1 | DEBIAN-CVE-2026-12087 |
| Ubuntu:22.04:LTS | libsocket-perl | no fix listed | UBUNTU-CVE-2026-12087 |
| Ubuntu:24.04:LTS | libsocket-perl | no fix listed | UBUNTU-CVE-2026-12087 |
| Ubuntu:25.10 | libsocket-perl | no fix listed | UBUNTU-CVE-2026-12087 |
| Ubuntu:26.04:LTS | libsocket-perl | no fix listed | UBUNTU-CVE-2026-12087 |
| Ubuntu:26.10 | libsocket-perl | no fix listed | UBUNTU-CVE-2026-12087 |
| Ubuntu:22.04:LTS | perl | 5.34.0-3ubuntu1.8 | USN-8675-1 |
| Ubuntu:22.04:LTS | perl | 5.34.0-3ubuntu1.8 | UBUNTU-CVE-2026-12087 |
| Ubuntu:24.04:LTS | perl | 5.38.2-3.2ubuntu0.4 | UBUNTU-CVE-2026-12087 |
| Ubuntu:24.04:LTS | perl | 5.38.2-3.2ubuntu0.4 | USN-8684-1 |
| Ubuntu:25.10 | perl | no fix listed | UBUNTU-CVE-2026-12087 |
| Ubuntu:26.04:LTS | perl | 5.40.1-7ubuntu0.3 | USN-8675-2 |
| Ubuntu:26.04:LTS | perl | 5.40.1-7ubuntu0.3 | UBUNTU-CVE-2026-12087 |
Affected products (as reported)
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