CVE-2025-40918
Unknown Unknown - Not Provided
BaseFortify

Publication date: 2025-07-16

Last updated on: 2025-11-04

Assigner: CPANSec

Description
Authen::SASL::Perl::DIGEST_MD5 versions 2.04 through 2.1800 for Perl generates the cnonce insecurely. The cnonce (client nonce) is generated from an MD5 hash of the PID, the epoch time and the built-in rand function. 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. According to RFC 2831, The cnonce-value is an opaque quoted string value provided by the client and used by both client and server to avoid chosen plaintext attacks, and to provide mutual authentication. The security of the implementation depends on a good choice. It is RECOMMENDED that it contain at least 64 bits of entropy.
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2025-07-16
Last Modified
2025-11-04
Generated
2026-05-27
AI Q&A
2025-07-16
EPSS Evaluated
2026-05-25
NVD
Affected Vendors & Products
Showing 5 associated CPEs
Vendor Product Version / Range
perl digest_md5 *
perl digest_hmac_md5 *
perl authen_sasl *
perl authen_sasl 2.1900
perl crypt_urandom *
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-340 The product uses a scheme that generates numbers or identifiers that are more predictable than required.
CWE-338 The product uses a Pseudo-Random Number Generator (PRNG) in a security context, but the PRNG's algorithm is not cryptographically strong.
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?

This vulnerability exists in Authen::SASL::Perl::DIGEST_MD5 versions 2.04 through 2.1800 for Perl, where the client nonce (cnonce) is generated insecurely. The cnonce is created using an MD5 hash of the process ID (PID), the epoch time, and the built-in rand function. Since the PID comes from a small set of numbers and the epoch time can be guessed or leaked, and because the built-in rand function is not suitable for cryptographic purposes, the cnonce lacks sufficient entropy and can be predicted or reproduced by attackers. This weakens the security of the authentication process.


How can this vulnerability impact me? :

Because the cnonce is generated with insufficient entropy and can be predicted, attackers may be able to perform chosen plaintext attacks or bypass mutual authentication protections. This can lead to unauthorized access or compromise of authentication sessions that rely on the DIGEST_MD5 mechanism, potentially exposing sensitive information or allowing impersonation.


Ask Our AI Assistant
Need more information? Ask your question to get an AI reply (Powered by our expertise)
0/70
EPSS Chart