CVE-2026-12087 Details
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.
A vulnerability exists in the Perl Socket module, specifically in versions prior to 2.041, allowing for an out-of-bounds heap read. The issue arises in the 'pack_ip_mreq_source' function within 'Socket.xs'. The function improperly checks the length of the source argument before reading it, leading to a situation where a valid multiaddress can bypass the check and allow a source of any length to be copied into a fixed 4-byte field. This flaw can be exploited by providing a source shorter than 4 bytes, causing the function to read up to 3 bytes beyond the intended buffer, and ultimately leading to the leakage of adjacent heap memory.
Users should upgrade to Perl Socket version 2.041 or later, where this vulnerability has been fixed.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
Volerion
Assessed Jun 15, 2026CISA-ADP
Assessed Jun 16, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://cert-portal.siemens.com/productcert/html/ssa-457936.html | siemens-SADP | |
| https://github.com/Perl/perl5/commit/de19a0b0ad1900fef976c5c1400bd8f11ec6c6cb.patch | CPANSec | Source CodeVendor |
| https://metacpan.org/release/PEVANS/Socket-2.041/changes | CPANSec | Release NotesVendor |
| http://www.openwall.com/lists/oss-security/2026/06/15/10 | CVE |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-125 | Out-of-bounds Read | CPANSec |
| CWE-805 | Buffer Access with Incorrect Length Value | CPANSec |
Affected Products
| Product | Versions |
|---|---|
| Perl Socket | < 2.041 |
CPE
Remediation
| |
Change History
9 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Nov 10, 2026 | CVE Modified | CPANSec |
| Nov 10, 2026 | CVE Modified | CVE |
| Nov 10, 2026 | CVE Modified | siemens-SADP |
| Oct 25, 2026 | CVE Translated | [email protected] |
| Jun 17, 2026 | CVE Modified | CPANSec |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Jun 16, 2026 | CVE Modified | CISA-ADP |
| Jun 16, 2026 | CVE Modified | CVE |
| Jun 15, 2026 | New CVE Received | CPANSec |
Volerion