Skip to content
Heist/ feed
Back to feed
Medium

Authen::SASL::Perl::DIGEST_MD5 versions 2.04 through 2.1800 for Perl generates the cnonce insecurely

Type: advisorySources: OSV

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.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2025-40918
Confirmed fixed CVEs
Not specified
Updated in this feed
2 Nov 2026, 23:57 UTC · Revision 1

Source evidence

Authen::SASL::Perl::DIGEST_MD5 versions 2.04 through 2.1800 for Perl generates the cnonce insecurely

core-osv · Original source

Published 16 Jul 2025, 14:00 UTC

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.

osv:CVE-2025-40918
Complete source record
{
  "id": "354f0edcf22f9e1c46de8eef28f92d44396bc6c1acfb48d6fdc02c7f627f72c6",
  "url": "https://osv.dev/vulnerability/CVE-2025-40918",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "Authen::SASL::Perl::DIGEST_MD5 versions 2.04 through 2.1800 for Perl generates the cnonce insecurely",
    "summary": "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.",
    "evidence": "osv:CVE-2025-40918",
    "products": [],
    "severity": "medium",
    "structured": {
      "id": "CVE-2025-40918",
      "aliases": [
        "CVE-2025-40918"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/perl-authen-sasl/perl-authen-sasl",
              "type": "GIT",
              "events": [
                {
                  "introduced": "34dd9210ae68ef745168fdcbe0b590cb6a3fb8b1"
                },
                {
                  "last_affected": "e456840b47c3b9ec8527c28eb954c2e548f27708"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "range": [
                      {
                        "introduced": "2.04"
                      },
                      {
                        "last_affected": "2.1800"
                      }
                    ],
                    "source": "AFFECTED_FIELD",
                    "strategy": "StandardRange"
                  },
                  {
                    "range": [
                      {
                        "introduced": "2.04"
                      },
                      {
                        "last_affected": "2.1800"
                      }
                    ],
                    "source": "DESCRIPTION"
                  }
                ]
              }
            }
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-40918.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:24.561755107Z",
      "provider": "osv",
      "references": [
        "https://cpan.org/modules",
        "https://datatracker.ietf.org/doc/html/rfc2831",
        "https://metacpan.org/dist/Authen-SASL/source/lib/Authen/SASL/Perl/DIGEST_MD5.pm#L263",
        "https://metacpan.org/release/EHUELS/Authen-SASL-2.1900/changes",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/40xxx/CVE-2025-40918.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2025-40918",
        "https://github.com/gbarr/perl-authen-sasl/pull/22",
        "https://security.metacpan.org/patches/A/Authen-SASL/2.1800/CVE-2025-40918-r1.patch",
        "https://github.com/gbarr/perl-authen-sasl"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-338",
          "CWE-340"
        ],
        "cna_assigner": "CPANSec",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/40xxx/CVE-2025-40918.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2025-40918",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 490984,
  "published_at": "2025-07-16T14:00:12.777+00:00"
}