CVE-2026-40199

Net::CIDR::Lite versions before 0.23 for Perl mishandles IPv4 mapped IPv6 addresses, which may allow IP ACL bypass. _pack_ipv6() includes the sentinel byte from _pack_ipv4() when building the packed representation of IPv4 mapped addresses like ::ffff:192.168.1.1. This produces an 18 byte value instead of 17 bytes, misaligning the IPv4 part of the address. The wrong length causes incorrect results in mask operations (bitwise AND truncates to the shorter operand) and in find() / bin_find() which use Perl string comparison (lt/gt). This can cause find() to incorrectly match or miss addresses. Example: my $cidr = Net::CIDR::Lite->new("::ffff:192.168.1.0/120"); $cidr->find("::ffff:192.168.2.0"); # incorrectly returns true This is triggered by valid RFC 4291 IPv4 mapped addresses (::ffff:x.x.x.x). See also CVE-2026-40198, a related issue in the same function affecting malformed IPv6 addresses.
Configurations

Configuration 1 (hide)

cpe:2.3:a:stigtsp:net\:\:cidr\:\:lite:*:*:*:*:*:perl:*:*

History

26 Oct 2026, 22:10

Type Values Removed Values Added
Summary
  • (es) Las versiones de Net::CIDR::Lite anteriores a la 0.23 para Perl manejan incorrectamente las direcciones IPv6 mapeadas a IPv4, lo que puede permitir la omisión de ACL de IP. _pack_ipv6() incluye el byte centinela de _pack_ipv4() al construir la representación empaquetada de direcciones mapeadas a IPv4 como ::ffff:192.168.1.1. Esto produce un valor de 18 bytes en lugar de 17 bytes, desalineando la parte IPv4 de la dirección. La longitud incorrecta causa resultados incorrectos en las operaciones de máscara (AND bit a bit trunca al operando más corto) y en find() / bin_find() que usan la comparación de cadenas de Perl (lt/gt). Esto puede hacer que find() coincida o omita direcciones incorrectamente. Ejemplo: my $cidr = Net::CIDR::Lite -> new(“::ffff:192.168.1.0/120”); $cidr -> find(“::ffff:192.168.2.0”); # devuelve true incorrectamente Esto se activa por direcciones IPv4 mapeadas válidas según RFC 4291 (::ffff:x.x.x.x). Véase también CVE-2026-40198, un problema relacionado en la misma función que afecta a direcciones IPv6 malformadas.

Information

Published : 2026-04-10 22:16

Updated : 2026-10-26 22:10


NVD link : CVE-2026-40199

Mitre link : CVE-2026-40199

CVE.ORG link : CVE-2026-40199


JSON object : View

Products Affected

stigtsp

  • net\
CWE
CWE-130

Improper Handling of Length Parameter Inconsistency