CVE-2026-12087Socket versions before 2.041 for Perl have an out-of-bounds heap read
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.
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
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.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 26.10 | libsocket-perl | Fix pending | UBUNTU-CVE-2026-12087 | |
| Ubuntu 26.04 | libsocket-perl | Fix pending | UBUNTU-CVE-2026-12087 | |
| Ubuntu 26.04 | perl | Fixed | 5.40.1-7ubuntu0.3 | UBUNTU-CVE-2026-12087 |
| Ubuntu 25.10 | libsocket-perl | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2026-12087 | |
| Ubuntu 25.10 | perl | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2026-12087 | |
| Ubuntu 24.04 | libsocket-perl | Fix pending | UBUNTU-CVE-2026-12087 | |
| Ubuntu 24.04 | perl | Fixed | 5.38.2-3.2ubuntu0.4 | UBUNTU-CVE-2026-12087 |
| Ubuntu 22.04 | libsocket-perl | Fix pending | UBUNTU-CVE-2026-12087 | |
| Ubuntu 22.04 | perl | Fixed | 5.34.0-3ubuntu1.8 | UBUNTU-CVE-2026-12087 |
| Ubuntu 20.04 | libsocket-perl | Fix pending | UBUNTU-CVE-2026-12087 | |
| Ubuntu 20.04 | perl | Fix pending | 5.30.0-9ubuntu0.5+esm3 (Ubuntu Pro) | UBUNTU-CVE-2026-12087 |
| Ubuntu 18.04 | libsocket-perl | Fix pending | UBUNTU-CVE-2026-12087 | |
| Ubuntu 18.04 | perl | Fix pending | 5.26.1-6ubuntu0.7+esm3 (Ubuntu Pro) | UBUNTU-CVE-2026-12087 |
| Ubuntu 16.04 | libsocket-perl | Fix pending | UBUNTU-CVE-2026-12087 | |
| Ubuntu 16.04 | perl | Fix pending | 5.22.1-9ubuntu0.9+esm3 (Ubuntu Pro) | UBUNTU-CVE-2026-12087 |
| Ubuntu 14.04 | perl | Fix pending | 5.18.2-2ubuntu1.7+esm8 (Ubuntu Pro) | UBUNTU-CVE-2026-12087 |
| Debian 14 | libsocket-perl | Fixed | 2.041-1 | DEBIAN-CVE-2026-12087 |
| Debian 14 | perl | Fixed | 5.42.3-1 | DEBIAN-CVE-2026-12087 |
| Debian 13 | libsocket-perl | Fixed | 2.038-1+deb13u1 | DEBIAN-CVE-2026-12087 |
| Debian 13 | perl | Fixed | 5.40.1-6+deb13u1 | DEBIAN-CVE-2026-12087 |
| Debian 12 | libsocket-perl | Fix pending | DEBIAN-CVE-2026-12087 | |
| Debian 12 | perl | Fixed | 5.36.0-7+deb12u4 | DEBIAN-CVE-2026-12087 |
| Red Hat Enterprise Linux 10 | perl-Socket | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 10 | perl-Socket6 | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 9 | perl-Socket | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 9 | perl-Socket6 | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 8 | perl-Socket | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 8 | perl-Socket6 | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 7 | perl-Socket | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 7 | perl-Socket6 | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 6 | perl-Socket6 | Will not fix Out of support scope | ||
| Alpine Linux 3.24 | perl | Fixed | 5.42.3-r0 | ALPINE-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.
- PEVANS Socket: affected: before 2.041; fixed in
2.041
Solution: Upgrade to version 2.041 or later.
Vendor advisories:
- https://metacpan.org/release/PEVANS/Socket-2.041/changes (release-notes)
- https://github.com/Perl/perl5/commit/de19a0b0ad1900fef976c5c1400bd8f11ec6c6cb.patch (patch)
References
- https://metacpan.org/release/PEVANS/Socket-2.041/changes
- https://github.com/Perl/perl5/commit/de19a0b0ad1900fef976c5c1400bd8f11ec6c6cb.patch
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.