CVE-2026-40198

Net::CIDR::Lite versions before 0.23 for Perl does not validate IPv6 group count, which may allow IP ACL bypass. _pack_ipv6() does not check that uncompressed IPv6 addresses (without ::) have exactly 8 hex groups. Inputs like "abcd", "1:2:3", or "1:2:3:4:5:6:7" are accepted and produce packed values of wrong length (3, 7, or 15 bytes instead of 17). The packed values are used internally for mask and comparison operations. find() and bin_find() use Perl string comparison (lt/gt) on these values, and comparing strings of different lengths gives wrong results. This can cause find() to incorrectly report an address as inside or outside a range. Example: my $cidr = Net::CIDR::Lite->new("::/8"); $cidr->find("1:2:3"); # invalid input, incorrectly returns true This is the same class of input validation issue as CVE-2021-47154 (IPv4 leading zeros) previously fixed in this module. See also CVE-2026-40199, a related issue in the same function affecting IPv4 mapped IPv6 addresses.
Configurations

Configuration 1 (hide)

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

History

26 Oct 2026, 21:10

Type Values Removed Values Added
Summary
  • (es) Las versiones de Net::CIDR::Lite anteriores a la 0.23 para Perl no validan el recuento de grupos IPv6, lo que puede permitir la omisión de ACL de IP. _pack_ipv6() no comprueba que las direcciones IPv6 sin comprimir (sin ::) tengan exactamente 8 grupos hexadecimales. Entradas como ’abcd’, ’1:2:3’ o ’1:2:3:4:5:6:7’ son aceptadas y producen valores empaquetados de longitud incorrecta (3, 7 o 15 bytes en lugar de 17). Los valores empaquetados se utilizan internamente para operaciones de máscara y comparación. find() y bin_find() utilizan la comparación de cadenas de Perl (lt/gt) en estos valores, y comparar cadenas de diferentes longitudes produce resultados incorrectos. Esto puede hacer que find() informe incorrectamente una dirección como dentro o fuera de un rango. Ejemplo: my $cidr = Net::CIDR::Lite -> new(’::/8’); $cidr -> find(’1:2:3’); # entrada inválida, devuelve true incorrectamente Esta es la misma clase de problema de validación de entrada que CVE-2021-47154 (ceros iniciales de IPv4) corregido previamente en este módulo. Véase también CVE-2026-40199, un problema relacionado en la misma función que afecta a las direcciones IPv6 mapeadas a IPv4.

Information

Published : 2026-04-10 22:16

Updated : 2026-10-26 21:10


NVD link : CVE-2026-40198

Mitre link : CVE-2026-40198

CVE.ORG link : CVE-2026-40198


JSON object : View

Products Affected

stigtsp

  • net\
CWE
CWE-1286

Improper Validation of Syntactic Correctness of Input