REDHAT-BUG-2550666: Command Injection
IMAP APPEND plus CRLF conversion command injection ==================================================
Project curl Security Advisory, October 14 2026 Permalink
VULNERABILITY -------------
Enabling CURLOPTCRLF causes curl to advertise the raw input byte count in the IMAP APPEND {N} literal while transmitting line-ending expanded data. The server reads only $N$ bytes for the payload, causing the remaining overflow bytes to be interpreted and executed as pipelined IMAP commands within the authenticated session.
INFO ----
Combining IMAP append with CRLF conversions is probably a rare occasion.
The Common Vulnerabilities and Exposures (CVE) project has assigned the name CVE-2026-87864 to this issue.
CWE-130: Improper Handling of Length Parameter Inconsistency
Severity: Low
AFFECTED VERSIONS -----------------
- Affected versions: curl 7.30.0 to and including 8.21.0 - Not affected versions: curl < 7.30.0 and >= 8.22.0 - Introduced-in: https://github.com/curl/curl/commit/f8c8c76d39ac2fa825481ba42
libcurl is used by many applications, but not always advertised as such!
This flaw also affects the curl command line tool.
SOLUTION --------
- Fixed-in: https://github.com/curl/curl/commit/3b547de301342b347fb3c6ea6ae797
RECOMMENDATIONS ---------------
A - Upgrade curl to version 8.22.0
B - Apply the patch to your local version
C - Avoid CURLOPTCRLF with IMAP
TIMELINE --------
This issue was reported to the curl project on August 26, 2026.
curl 8.22.0 was released on September 2, 2026. This advisory was published on October 14, 2026.
CREDITS -------
- Reported-by: Stanislav Fort (Aisle Research) - Patched-by: Stefan Eissing
Thanks a lot!
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
curlto a version that resolves this vulnerability.Fixed in 8.22.0 - Configuration
Avoid using CURLOPT_CRLF with IMAP.
curl CURLOPT_CRLF = Do not use with IMAP
Event History
Frequently Asked Questions
Which deployments are affected?
curl and libcurl versions 7.30.0 through 8.21.0 are affected. The issue applies when IMAP APPEND is used with CURLOPT_CRLF enabled, and it affects both libcurl-using applications and the curl command-line tool.
What is required for the unintended commands to run?
CURLOPT_CRLF must cause line-ending expansion during an IMAP APPEND operation. The server then treats bytes beyond the advertised literal length as pipelined IMAP commands in the authenticated session.
How can I determine whether an application is exposed?
Identify applications and scripts using curl or libcurl, confirm whether their version falls from 7.30.0 through 8.21.0, and check whether they perform IMAP APPEND operations with CURLOPT_CRLF enabled. Versions earlier than 7.30.0 and versions 8.22.0 or later are not affected.