CVE-2026-40198
Full vulnerability record from the local CVENow database.
Description
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.
View original CVE JSON
{
"id": "CVE-2026-40198",
"sourceIdentifier": "9b29abf9-4ab0-4765-b253-1875cd9b441e",
"published": "2026-04-10T22:16:21.463",
"lastModified": "2026-10-26T21:10:00.170",
"vulnStatus": "Analyzed",
"cveTags": [],
"descriptions": [
{
"lang": "en",
"value": "Net::CIDR::Lite versions before 0.23 for Perl does not validate IPv6 group count, which may allow IP ACL bypass.\n\n_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).\n\nThe 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.\n\nExample:\n\n my $cidr = Net::CIDR::Lite->new(\"::/8\");\n $cidr->find(\"1:2:3\"); # invalid input, incorrectly returns true\n\nThis is the same class of input validation issue as CVE-2021-47154 (IPv4 leading zeros) previously fixed in this module.\n\nSee also CVE-2026-40199, a related issue in the same function affecting IPv4 mapped IPv6 addresses."
},
{
"lang": "es",
"value": "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.\n\n_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).\n\nLos 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.\n\nEjemplo:\n\n my $cidr = Net::CIDR::Lite -> new(’::/8’);\n $cidr -> find(’1:2:3’); # entrada inválida, devuelve true incorrectamente\n\nEsta 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.\n\nVéase también CVE-2026-40199, un problema relacionado en la misma función que afecta a las direcciones IPv6 mapeadas a IPv4."
}
],
"affected": [
{
"source": "9b29abf9-4ab0-4765-b253-1875cd9b441e",
"affectedData": [
{
"vendor": "STIGTSP",
"product": "Net::CIDR::Lite",
"defaultStatus": "unaffected",
"collectionURL": "https://cpan.org/modules",
"packageName": "Net-CIDR-Lite",
"programFiles": [
"Lite.pm"
],
"programRoutines": [
{
"name": "Net::CIDR::Lite::_pack_ipv6"
}
],
"repo": "https://github.com/stigtsp/Net-CIDR-Lite",
"versions": [
{
"version": "0",
"lessThan": "0.23",
"versionType": "custom",
"status": "affected"
}
]
}
]
}
],
"metrics": {
"cvssMetricV31": [
{
"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
"type": "Secondary",
"cvssData": {
"version": "3.1",
"vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N",
"baseScore": 7.5,
"baseSeverity": "HIGH",
"attackVector": "NETWORK",
"attackComplexity": "LOW",
"privilegesRequired": "NONE",
"userInteraction": "NONE",
"scope": "UNCHANGED",
"confidentialityImpact": "NONE",
"integrityImpact": "HIGH",
"availabilityImpact": "NONE"
},
"exploitabilityScore": 3.9,
"impactScore": 3.6
}
],
"ssvcV203": [
{
"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
"ssvcData": {
"timestamp": "2026-04-13T14:41:19.772152Z",
"id": "CVE-2026-40198",
"options": [
{
"exploitation": "none"
},
{
"automatable": "yes"
},
{
"technicalImpact": "partial"
}
],
"role": "CISA Coordinator",
"version": "2.0.3"
}
}
]
},
"weaknesses": [
{
"source": "9b29abf9-4ab0-4765-b253-1875cd9b441e",
"type": "Secondary",
"description": [
{
"lang": "en",
"value": "CWE-1286"
}
]
}
],
"configurations": [
{
"nodes": [
{
"operator": "OR",
"negate": false,
"cpeMatch": [
{
"vulnerable": true,
"criteria": "cpe:2.3:a:stigtsp:net\\:\\:cidr\\:\\:lite:*:*:*:*:*:perl:*:*",
"versionEndExcluding": "0.23",
"matchCriteriaId": "2B8C0BC5-5E3C-4399-9FD6-437BFF65130F"
}
]
}
]
}
],
"references": [
{
"url": "https://github.com/stigtsp/Net-CIDR-Lite/commit/25d65f85dbe4885959a10471725ec9d250a589c3.patch",
"source": "9b29abf9-4ab0-4765-b253-1875cd9b441e",
"tags": [
"Patch"
]
},
{
"url": "https://metacpan.org/release/STIGTSP/Net-CIDR-Lite-0.23/changes",
"source": "9b29abf9-4ab0-4765-b253-1875cd9b441e",
"tags": [
"Release Notes"
]
},
{
"url": "https://www.cve.org/CVERecord?id=CVE-2026-40199",
"source": "9b29abf9-4ab0-4765-b253-1875cd9b441e",
"tags": [
"Third Party Advisory"
]
}
]
}