CVE-2025-40918 Details
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.
A 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 from an MD5 hash of the process ID (PID), the epoch time, and the built-in random function, which is not suitable for cryptographic use. The PID is derived from a limited range of numbers, and the epoch time can be estimated unless it is disclosed in the HTTP Date header. This insecure generation of cnonce compromises the integrity of the authentication process by making it vulnerable to certain types of attacks.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
Volerion
Assessed Jul 16, 2025CISA-ADP
Assessed Jul 16, 2025References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://datatracker.ietf.org/doc/html/rfc2831 | CPANSec | |
| https://github.com/gbarr/perl-authen-sasl/pull/22 | CPANSec | |
| https://metacpan.org/dist/Authen-SASL/source/lib/Authen/SASL/Perl/DIGEST_MD5.pm#L263 | CPANSec | Source CodeVendor |
| https://metacpan.org/release/EHUELS/Authen-SASL-2.1900/changes | CPANSec | |
| https://security.metacpan.org/patches/A/Authen-SASL/2.1800/CVE-2025-40918-r1.patch | CPANSec | Broken LinkSource CodeVendor |
| http://www.openwall.com/lists/oss-security/2025/07/16/5 | CVE |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-338 | Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG) | CPANSec |
| CWE-340 | Generation of Predictable Numbers or Identifiers | CPANSec |
Affected Products
| Product | Versions |
|---|---|
| Authen::SASL::Perl::DIGEST_MD5 | All versions |
CPE
Remediation
| |
Change History
7 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jun 17, 2026 | CVE Modified | CPANSec |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Nov 4, 2025 | CVE Modified | CVE |
| Aug 7, 2025 | CVE Modified | CPANSec |
| Jul 16, 2025 | CVE Modified | CISA-ADP |
| Jul 16, 2025 | CVE Modified | CPANSec |
| Jul 16, 2025 | New CVE Received | CPANSec |
Volerion