CVE-2025-40931
Apache::Session::Generate::MD5 versions through 1.94 for Perl create insecure session id.
Apache::Session::Generate::MD5 generates session ids insecurely. The default session id generator returns a MD5 hash seeded with the built-in rand() function, the epoch time, and the PID. The PID will come from a small set of numbers, and the epoch time may be guessed, if it is not leaked from the HTTP Date header. The built-in rand function is unsuitable for cryptographic usage. Predicable session ids could allow an attacker to gain access to systems.
Note that the libapache-session-perl package in some Debian-based Linux distributions may be patched to use Crypt::URandom.
CVSS
- Versión: 3.1
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
- Puntuación base: 9.1
Probabilidad de explotación (EPSS)
- Probabilidad de explotación en los próximos 30 días: 0.59%
- Percentil entre todas las CVEs puntuadas: 47
- Fecha de la puntuación: 5/10/2026
EPSS (Exploit Prediction Scoring System, de FIRST) estima la probabilidad de que una vulnerabilidad sea explotada en 30 días. Complementa a CVSS (impacto) y a CISA KEV (explotación confirmada).
🎯 Técnicas ATT&CK
Cómo se explota esta vulnerabilidad y qué consigue el atacante, en el lenguaje de MITRE ATT&CK.
- Explotación
T1190Exploit Public-Facing Applicationinitial access75 % - Impacto principal
T1078Valid Accountsstealth · persistence · privilege escalation · initial access80 % - Impacto secundario
T1652Device Driver Discoverydiscovery65 %
AV:N/PR:N indica exposición remota sin autenticación. El atacante predice IDs de sesión débiles (MD5 con rand() inseguro) para suplantar usuarios autenticados (T1078) y potencialmente acceder a datos (C:H).
Inferido por nuestro agente de análisis a partir de la descripción oficial, el vector CVSS y la CWE, y comprobado por un supervisor. Puede contener errores.
🛡️ Mitigaciones ATT&CK que cubren estas técnicas
Tecnologías afectadas (1)
CWE
- CWE-338, CWE-340
Referencias
- https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=930659
- https://github.com/chorny/Apache-Session/issues/4
- https://gitlab.ow2.org/lemonldap-ng/lemonldap-ng/-/work_items/1633
- https://metacpan.org/dist/Apache-Session/source/lib/Apache/Session/Generate/MD5.pm#L27
- https://metacpan.org/pod/Apache::Session::Generate::Random
- https://rt.cpan.org/Ticket/Display.html?id=173631
- https://salsa.debian.org/perl-team/modules/packages/libapache-session-perl/-/commit/bdabd71c2f91b18526e31a9dc52b4c17b3d246b7#898a4b8b00022df1b8689910b67707f3e738d180
- https://security.metacpan.org/docs/guides/random-data-for-security.html
- https://www.openwall.com/lists/oss-security/2019/06/15/1
- http://www.openwall.com/lists/oss-security/2026/03/05/3
JSON original (NVD)
Mostrar
{
"id": "CVE-2025-40931",
"cveTags": [],
"metrics": {
"ssvcV203": [
{
"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
"ssvcData": {
"id": "CVE-2025-40931",
"role": "CISA Coordinator",
"options": [
{
"exploitation": "none"
},
{
"automatable": "yes"
},
{
"technicalImpact": "total"
}
],
"version": "2.0.3",
"timestamp": "2026-03-05T16:38:07.301789Z"
}
}
],
"cvssMetricV31": [
{
"type": "Secondary",
"source": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
"cvssData": {
"scope": "UNCHANGED",
"version": "3.1",
"baseScore": 9.1,
"attackVector": "NETWORK",
"baseSeverity": "CRITICAL",
"vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N",
"integrityImpact": "HIGH",
"userInteraction": "NONE",
"attackComplexity": "LOW",
"availabilityImpact": "NONE",
"privilegesRequired": "NONE",
"confidentialityImpact": "HIGH"
},
"impactScore": 5.2,
"exploitabilityScore": 3.9
}
]
},
"affected": [
{
"source": "9b29abf9-4ab0-4765-b253-1875cd9b441e",
"affectedData": [
{
"repo": "https://github.com/chorny/Apache-Session",
"vendor": "CHORNY",
"product": "Apache::Session::Generate::MD5",
"versions": [
{
"status": "affected",
"version": "0",
"versionType": "custom",
"lessThanOrEqual": "1.94"
}
],
"packageName": "Apache-Session",
"programFiles": [
"lib/Session/Generate/MD5.pm"
],
"collectionURL": "https://cpan.org/modules",
"defaultStatus": "unaffected"
}
]
}
],
"published": "2026-03-05T02:16:39.960",
"references": [
{
"url": "https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=930659",
"source": "9b29abf9-4ab0-4765-b253-1875cd9b441e"
},
{
"url": "https://github.com/chorny/Apache-Session/issues/4",
"tags": [
"Issue Tracking"
],
"source": "9b29abf9-4ab0-4765-b253-1875cd9b441e"
},
{
"url": "https://gitlab.ow2.org/lemonldap-ng/lemonldap-ng/-/work_items/1633",
"source": "9b29abf9-4ab0-4765-b253-1875cd9b441e"
},
{
"url": "https://metacpan.org/dist/Apache-Session/source/lib/Apache/Session/Generate/MD5.pm#L27",
"tags": [
"Product"
],
"source": "9b29abf9-4ab0-4765-b253-1875cd9b441e"
},
{
"url": "https://metacpan.org/pod/Apache::Session::Generate::Random",
"source": "9b29abf9-4ab0-4765-b253-1875cd9b441e"
},
{
"url": "https://rt.cpan.org/Ticket/Display.html?id=173631",
"tags": [
"Third Party Advisory"
],
"source": "9b29abf9-4ab0-4765-b253-1875cd9b441e"
},
{
"url": "https://salsa.debian.org/perl-team/modules/packages/libapache-session-perl/-/commit/bdabd71c2f91b18526e31a9dc52b4c17b3d246b7#898a4b8b00022df1b8689910b67707f3e738d180",
"source": "9b29abf9-4ab0-4765-b253-1875cd9b441e"
},
{
"url": "https://security.metacpan.org/docs/guides/random-data-for-security.html",
"tags": [
"Mailing List",
"Third Party Advisory"
],
"source": "9b29abf9-4ab0-4765-b253-1875cd9b441e"
},
{
"url": "https://www.openwall.com/lists/oss-security/2019/06/15/1",
"source": "9b29abf9-4ab0-4765-b253-1875cd9b441e"
},
{
"url": "http://www.openwall.com/lists/oss-security/2026/03/05/3",
"tags": [
"Mailing List",
"Third Party Advisory"
],
"source": "af854a3a-2127-422b-91ae-364da2661108"
}
],
"vulnStatus": "Modified",
"weaknesses": [
{
"type": "Secondary",
"source": "9b29abf9-4ab0-4765-b253-1875cd9b441e",
"description": [
{
"lang": "en",
"value": "CWE-338"
},
{
"lang": "en",
"value": "CWE-340"
}
]
}
],
"descriptions": [
{
"lang": "en",
"value": "Apache::Session::Generate::MD5 versions through 1.94 for Perl create insecure session id.\n\nApache::Session::Generate::MD5 generates session ids insecurely. The default session id generator returns a MD5 hash seeded with the built-in rand() function, the epoch time, and the PID. The PID will come from a small set of numbers, and the epoch time may be guessed, if it is not leaked from the HTTP Date header. The built-in rand function is unsuitable for cryptographic usage. Predicable session ids could allow an attacker to gain access to systems.\n\nNote that the libapache-session-perl package in some Debian-based Linux distributions may be patched to use Crypt::URandom."
},
{
"lang": "es",
"value": "Las versiones de Apache::Session::Generate::MD5 hasta la 1.94 para Perl crean un ID de sesión inseguro.\n\nApache::Session::Generate::MD5 genera IDs de sesión de forma insegura. El generador de ID de sesión predeterminado devuelve un hash MD5 inicializado con la función rand() incorporada, el tiempo de época y el PID. El PID provendrá de un pequeño conjunto de números, y el tiempo de época puede ser adivinado, si no se filtra del encabezado HTTP Date. La función rand incorporada no es adecuada para uso criptográfico. Los IDs de sesión predecibles podrían permitir a un atacante obtener acceso a los sistemas."
}
],
"lastModified": "2026-06-17T09:22:19.070",
"configurations": [
{
"nodes": [
{
"negate": false,
"cpeMatch": [
{
"criteria": "cpe:2.3:a:chorny:apache\\:\\:session\\:\\:generate\\:\\:md5:*:*:*:*:*:perl:*:*",
"vulnerable": true,
"matchCriteriaId": "D04C726E-3C53-423A-8F6D-C2DC97BD228F",
"versionEndIncluding": "1.94"
}
],
"operator": "OR"
}
]
}
],
"sourceIdentifier": "9b29abf9-4ab0-4765-b253-1875cd9b441e"
}