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.
Published: 2026-07-03
Score: 9.1 Critical
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

The Net::IP::LPM Perl module passes a user‑supplied prefix string directly to its trie builder without validating that the prefix length is within the bounds of the address width. When add() receives a length greater than 32 for IPv4 or 128 for IPv6, the builder walks past the end of the packed address and performs an out‑of‑bounds read of up to 32 bytes. The data read is not used by any public API, but it can trigger a hard abort in hardened allocators, sanitizers or certain runtime environments, resulting in a denial‑of‑service or process termination. This weakness corresponds to CWE‑125.

Affected Systems

Perl applications that import TPODER's 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 July 23, 2026 at 16:23 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 July 23, 2026 at 16:23 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

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-07-06T18:36:22.103Z

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

Link: CVE-2026-56015

cve-icon Vulnrichment

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

cve-icon NVD

No data.

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-07-23T16:30:09Z

Weaknesses