CVE-2026-43860 Overview
CVE-2026-43860 affects the mutt mail client in versions prior to 2.3.2. The vulnerability stems from an off-by-one error [CWE-193] in the IMAP auth_cram MD5 digest routine. When a user-supplied password exceeds MD5_BLOCK_LEN, mutt hashes it and copies the digest using strfcpy(), which truncates the output by one byte. This produces a shortened hash_passwd used during IMAP CRAM-MD5 authentication. The fix replaces the string copy with a fixed-size memcpy() to preserve the full MD5_DIGEST_LEN bytes.
Critical Impact
The truncated hash weakens IMAP CRAM-MD5 authentication integrity, but exploitation is limited and requires a high-complexity network position.
Affected Products
- mutt mail client versions before 2.3.2
- IMAP authentication path using CRAM-MD5 with passwords longer than MD5_BLOCK_LEN
- Source file imap/auth_cram.c
Discovery Timeline
- 2026-05-04 - CVE-2026-43860 published to NVD
- 2026-05-05 - Last updated in NVD database
Technical Details for CVE-2026-43860
Vulnerability Analysis
The defect lives in mutt's CRAM-MD5 authentication helper inside imap/auth_cram.c. When the user's IMAP password exceeds MD5_BLOCK_LEN, the code first hashes the password with md5_buffer() to produce a 16-byte digest stored in hash_passwd. The original implementation then calls strfcpy() to move that digest into the secret buffer. strfcpy() is a string-safe copy routine that always writes a terminating NUL byte within the destination size, so copying MD5_DIGEST_LEN bytes into a MD5_DIGEST_LEN-sized buffer drops the final byte of the binary digest. The result is a 15-byte secret padded with NUL, used to compute the HMAC response sent to the IMAP server.
Root Cause
The root cause is the misuse of a string copy primitive on binary data. strfcpy() reserves one byte for NUL termination, which is appropriate for strings but invalid for fixed-length cryptographic material. This off-by-one truncation reduces the effective entropy of the derived secret and causes mutt to compute CRAM-MD5 responses that diverge from any compliant server-side implementation receiving the same long password.
Attack Vector
An attacker on the network path between mutt and an IMAP server could observe or attempt to recover authentication material that has reduced entropy. The attack vector is network-based, requires no privileges, and requires no user interaction, but the attack complexity is high because the issue only triggers for passwords longer than MD5_BLOCK_LEN and impacts only integrity of the authentication exchange. Confidentiality and availability are unaffected.
// Source: https://github.com/muttmua/mutt/commit/834c5a2ed0479e51e8662a31caed129f136f4805
// Patch in imap/auth_cram.c — replace string copy with memcpy for binary digest
if (secret_len > MD5_BLOCK_LEN)
{
md5_buffer (password, secret_len, hash_passwd);
- strfcpy ((char*) secret, (char*) hash_passwd, MD5_DIGEST_LEN);
+ memcpy(secret, hash_passwd, MD5_DIGEST_LEN);
secret_len = MD5_DIGEST_LEN;
}
else
Detection Methods for CVE-2026-43860
Indicators of Compromise
- Repeated IMAP AUTHENTICATE CRAM-MD5 failures from mutt clients using long passwords against compliant servers
- IMAP server logs showing CRAM-MD5 HMAC mismatches correlated with mutt User-Agent strings
- Presence of mutt binaries reporting versions earlier than 2.3.2 on user workstations
Detection Strategies
- Inventory installed mutt packages across endpoints and flag any version below 2.3.2
- Audit IMAP server authentication logs for CRAM-MD5 failures originating from known mutt hosts
- Inspect build pipelines and package mirrors for vendored copies of imap/auth_cram.c lacking the memcpy() fix
Monitoring Recommendations
- Alert on anomalous IMAP authentication failure rates per user account
- Track mutt package versions through software inventory tooling and trigger alerts on vulnerable releases
- Capture IMAP traffic on sensitive segments to validate that CRAM-MD5 has been retired in favor of stronger SASL mechanisms
How to Mitigate CVE-2026-43860
Immediate Actions Required
- Upgrade mutt to version 2.3.2 or later on every system where the client is installed
- Disable CRAM-MD5 on IMAP servers and require SASL SCRAM-SHA-256 or TLS client certificates where supported
- Rotate any IMAP passwords longer than MD5_BLOCK_LEN that were used by vulnerable mutt builds
Patch Information
The upstream fix is committed as 834c5a2ed0479e51e8662a31caed129f136f4805 in the muttmua/mutt repository. The patch replaces strfcpy() with memcpy() so that the full MD5_DIGEST_LEN bytes of the hashed password are copied into the secret buffer. Reference: GitHub Commit 834c5a2.
Workarounds
- Configure mutt accounts to use IMAP LOGIN over TLS or OAUTHBEARER instead of CRAM-MD5
- Restrict IMAP passwords to lengths at or below MD5_BLOCK_LEN to avoid the truncation path
- Tunnel IMAP traffic over a mutually authenticated TLS channel to limit on-path observation
# Example mutt configuration to avoid CRAM-MD5
set imap_authenticators="oauthbearer:login"
set ssl_force_tls=yes
set ssl_starttls=yes
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

