CVE-2026-107161
cyrus-sasl: Heap buffer overflow in cyrus-sasl add_to_challenge() allows malicious server to crash or compromise DIGEST-MD5 clients
Severity
ModerateRed Hat Product Security
CVSS 3.1
Review impact separately from score.
Published · October 8, 2026
Updated · October 31, 2026
Description
A heap-based buffer overflow flaw was found in Cyrus SASL. The add_to_challenge() function in the DIGEST-MD5 plugin computes the size of the buffer needed for a challenge/response field before DIGEST-MD5 quoting is applied, but does not recompute that size when quoting (escaping special characters) makes the value longer. The under-sized buffer is then passed to strcat(), causing a heap-based out-of-bounds write whose size depends on attacker-controlled input. A malicious or on-path DIGEST-MD5 (or HTTP Digest) server can trigger this flaw in a connecting client by supplying a crafted challenge field, such as realm or nonce, most likely resulting in a crash of the client application.
Statement
The DIGEST-MD5 SASL mechanism affected by this flaw was declared Historic by RFC 6331 and has since been removed entirely from the current Cyrus SASL upstream codebase. It remains present in released versions shipped by Red Hat. Exploitation requires a client to authenticate using DIGEST-MD5 (or HTTP Digest, which shares the same code path) against a malicious or on-path server. The directly demonstrated impact is a client-side crash (denial of service); code execution has not been demonstrated and would depend on allocator state and heap layout. Given the deprecated status of the affected mechanism, the need for a malicious or on-path server, and that only a denial-of-service impact has been demonstrated, this flaw is rated Moderate rather than Important.
CVSS score applicability
The CVSS score(s) listed for this vulnerability do not reflect the associated product's status, and are included for informational purposes to better understand the severity of this vulnerability.
Mitigation
If DIGEST-MD5 authentication is not strictly required, remove the optional cyrus-sasl-md5 package to eliminate the vulnerable plugin:
dnf remove cyrus-sasl-md5
Alternatively, configure client applications to disable DIGEST-MD5 and HTTP Digest authentication methods, prioritizing stronger mechanisms such as GSSAPI or SCRAM.
Caveat: Removing cyrus-sasl-md5 removes support for both DIGEST-MD5 and CRAM-MD5 mechanisms. Any client or server process depending on these algorithms will fail to negotiate authentication. Active services utilizing SASL may need to be restarted to unload the plugin from memory.
CVSS / CWE
CVSS 3.1 · 7.5CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H
CWE-122 · Heap-based Buffer Overflow