
IMAP Command Injection via CRLF in the `_uid` Parameter
IMAP Command Injection via CRLF in the _uid Parameter
Severity: High - CVSS 3.1 AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:H/A:N = 7.1
Fixed in 1.7.5
Discovered / Reported by: Wahab "Neo`X" KHADIR.
https://nvd.nist.gov/vuln/detail/cve-2026-113386
_uid is contractually a numeric IMAP message UID (the UI only ever emits integers), but it is read as a raw string from the GET parameter and interpolated unvalidated into an IMAP command line of the pure-PHP IMAP client (rcube_imap_generic.php). An embedded CRLF terminates the intended UID FETCH command, so every following byte is executed as additional IMAP commands inside the victim's own authenticated session.
Entry point (no CSRF token, no authentication required, empty-POST requests skip the token check in check_request()):
GET /index.php?_task=mail&_action=headers&_mbox=INBOX&_uid=1%0D%0AA9001%20APPEND%20INBOX...
(the same sink is reachable via the viewsource action). The payload must not contain a . a dot routes the action into a different, checked parsing path. Decoded, the _uid above is 1 + CRLF + an arbitrary IMAP command sequence.
With one link click (phishing mail, shared URL, hidden `` bait on any web page), an unauthenticated attacker, with no credentials and no CSRF token, can:
APPEND) - e.g. a phishing message "from the victim" to the victim's own address book,UID STORE +FLAGS (\Deleted), UID EXPUNGE, UID MOVE),UID COPY <uid> public/<folder>).