Description
Net::IP::LPM versions before 1.11 for Perl allow a heap out-of-bounds read via an unbounded prefix length.

add() passes the prefix string to the trie builder addPrefixToTrie() without checking it against the address width.

addPrefixToTrie() then walks the prefix buffer by prefix_length bits, reading prefix[byte] for byte up to prefix_len/8, where prefix is the 4-byte (IPv4) or 16-byte (IPv6) packed address. A prefix length greater than 32 for IPv4 or 128 for IPv6, for example add("1.2.3.4/255", $v) or add("2001:db8::/255", $v), reads past the end of the packed address.

The out-of-bounds read happens during trie construction and is bounded: the prefix length is stored as an unsigned char, so the bit walk reads at most 32 bytes from the start of the packed address, a short distance past the end of the 4-byte or 16-byte buffer. It is detectable under AddressSanitizer, valgrind, or a hardened allocator, where it can abort the process. Lookups and dump() format only the valid address width, so the out-of-bounds bytes are not exposed through the module's API.
Published: 2026-07-03
Score: 9.1 Critical
EPSS: < 1% Very Low
KEV: No
Impact: Out-of-Bounds Read
Action: Apply Patch
AI Analysis

Impact

The Net::IP::LPM Perl module, in versions prior to 1.11, performs a heap out-of-bounds read during trie construction when add() is called with a prefix length that exceeds the address width. The prefix string is forwarded to addPrefixToTrie() without validating the length; the helper then walks the packed address buffer bit by bit, reading bytes up to prefix_len/8. For a prefix length over 32 for IPv4 or 128 for IPv6 (for example, add('1.2.3.4/255', …) or add('2001:db8::/255', …)), the read index goes beyond the 4-byte or 16-byte buffer. Since the length is stored in an unsigned char, the over-read is limited to at most 32 bytes beyond the buffer. These out-of-bounds reads are detectable by AddressSanitizer, Valgrind or a hardened allocator and may cause the process to abort, but no user data is returned by the module's API.

Affected Systems

Perl applications that import Net::IP::LPM module version 1.10 or earlier are affected. The flaw is triggered by the add() API when it receives a malformed prefix length supplied by external input or another component. The vulnerability is confined to the construction of the routing trie and does not expose data through the module's API.

Risk and Exploitability

The CVSS score of 9.1 indicates a high‑severity vulnerability that can be triggered by a simple API call. Although the EPSS score of < 1% suggests a low likelihood of observed exploitation at present, the potential for immediate process termination makes the risk significant for any system that imports the affected module. The breach is not listed in the CISA KEV catalog, indicating no widespread attacks have been reported. The attack vector is inferred to be an application that can influence the call to add(), either locally or remotely, depending on how the Perl code is exposed. Prompt mitigation is therefore advised.

Generated by OpenCVE AI on September 7, 2026 at 19:51 UTC.

Remediation

Vendor Workaround

Apply the patch. Otherwise, reject prefix lengths greater than 32 (IPv4) or 128 (IPv6) before passing them to add().


OpenCVE Recommended Actions

  • Download and apply the official patch from https://security.metacpan.org/patches/N/Net-IP-LPM/1.10/CVE-2026-56015-r2.patch to the Net::IP::LPM source code.
  • If a patch cannot be applied, configure the application to reject prefix lengths greater than 32 for IPv4 or 128 for IPv6 before passing them to add().
  • Upgrade to a Net::IP::LPM release newer than 1.10, or switch to an alternative routing library if no newer release is available.

Generated by OpenCVE AI on September 7, 2026 at 19:51 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Mon, 07 Sep 2026 18:30:00 +0000

Type Values Removed Values Added
Description Net::IP::LPM versions through 1.10 for Perl allow a heap out-of-bounds read via an unbounded prefix length. add() passes the prefix string to the trie builder addPrefixToTrie() without checking it against the address width. addPrefixToTrie() then walks the prefix buffer by prefix_length bits, reading prefix[byte] for byte up to prefix_len/8, where prefix is the 4-byte (IPv4) or 16-byte (IPv6) packed address. A prefix length greater than 32 for IPv4 or 128 for IPv6, for example add("1.2.3.4/255", $v) or add("2001:db8::/255", $v), reads past the end of the packed address. The out-of-bounds read happens during trie construction and is bounded: the prefix length is stored as an unsigned char, so the bit walk reads at most 32 bytes from the start of the packed address, a short distance past the end of the 4-byte or 16-byte buffer. It is detectable under AddressSanitizer, valgrind, or a hardened allocator, where it can abort the process. Lookups and dump() format only the valid address width, so the out-of-bounds bytes are not exposed through the module's API. Net::IP::LPM versions before 1.11 for Perl allow a heap out-of-bounds read via an unbounded prefix length. add() passes the prefix string to the trie builder addPrefixToTrie() without checking it against the address width. addPrefixToTrie() then walks the prefix buffer by prefix_length bits, reading prefix[byte] for byte up to prefix_len/8, where prefix is the 4-byte (IPv4) or 16-byte (IPv6) packed address. A prefix length greater than 32 for IPv4 or 128 for IPv6, for example add("1.2.3.4/255", $v) or add("2001:db8::/255", $v), reads past the end of the packed address. The out-of-bounds read happens during trie construction and is bounded: the prefix length is stored as an unsigned char, so the bit walk reads at most 32 bytes from the start of the packed address, a short distance past the end of the 4-byte or 16-byte buffer. It is detectable under AddressSanitizer, valgrind, or a hardened allocator, where it can abort the process. Lookups and dump() format only the valid address width, so the out-of-bounds bytes are not exposed through the module's API.
Title Net::IP::LPM versions through 1.10 for Perl allow a heap out-of-bounds read via an unbounded prefix length Net::IP::LPM versions before 1.11 for Perl allow a heap out-of-bounds read via an unbounded prefix length
References

Mon, 06 Jul 2026 23:15:00 +0000

Type Values Removed Values Added
First Time appeared Tpoder
Tpoder net::ip::lpm
Vendors & Products Tpoder
Tpoder net::ip::lpm

Mon, 06 Jul 2026 19:30:00 +0000

Type Values Removed Values Added
Metrics cvssV3_1

{'score': 9.1, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H'}

ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Fri, 03 Jul 2026 13:15:00 +0000

Type Values Removed Values Added
Description Net::IP::LPM versions through 1.10 for Perl allow a heap out-of-bounds read via an unbounded prefix length. add() passes the prefix string to the trie builder addPrefixToTrie() without checking it against the address width. addPrefixToTrie() then walks the prefix buffer by prefix_length bits, reading prefix[byte] for byte up to prefix_len/8, where prefix is the 4-byte (IPv4) or 16-byte (IPv6) packed address. A prefix length greater than 32 for IPv4 or 128 for IPv6, for example add("1.2.3.4/255", $v) or add("2001:db8::/255", $v), reads past the end of the packed address. The out-of-bounds read happens during trie construction and is bounded: the prefix length is stored as an unsigned char, so the bit walk reads at most 32 bytes from the start of the packed address, a short distance past the end of the 4-byte or 16-byte buffer. It is detectable under AddressSanitizer, valgrind, or a hardened allocator, where it can abort the process. Lookups and dump() format only the valid address width, so the out-of-bounds bytes are not exposed through the module's API.
Title Net::IP::LPM versions through 1.10 for Perl allow a heap out-of-bounds read via an unbounded prefix length
Weaknesses CWE-125
References

Subscriptions

Tpoder Net::ip::lpm
cve-icon MITRE

Status: PUBLISHED

Assigner: CPANSec

Published:

Updated: 2026-09-07T18:26:59.147Z

Reserved: 2026-06-18T11:27:09.117Z

Link: CVE-2026-56015

cve-icon Vulnrichment

Updated: 2026-07-03T16:31:29.386Z

cve-icon NVD

Status : Deferred

Published: 2026-07-03T13:17:30.130

Modified: 2026-09-07T19:17:26.970

Link: CVE-2026-56015

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-09-07T20:00:05Z

Weaknesses