CRLF Injection in Hastymail lib/session.php
A CRLF injection vulnerability exists in lib/session.php in Hastymail 1.5 and earlier (before 20061008), allowing remote authenticated users to inject arbitrary IMAP commands by including CRLF sequences in mailbox names. This occurs due to improper sanitization of user-supplied mailbox names before they are used in IMAP commands.
What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.
What an attacker gets, and what they’ve been doing with it.
An authenticated attacker can inject arbitrary IMAP commands, potentially manipulating the IMAP session in unintended ways. If the IMAP server is configured to prevent direct user sessions, this vulnerability can be used to cross privilege boundaries, possibly leading to unauthorized actions on the mail server.
If you can’t patch tonight, do this now.
As an interim measure, restrict mailbox names to exclude CRLF characters and monitor for suspicious mailbox naming patterns. Additionally, consider filtering or sanitizing user input at the application or web server level until a patch can be applied.
Patch, then assume compromise.
Upgrade to Hastymail version 1.5 (20061008) or later, where the input validation and sanitization of mailbox names has been corrected to prevent CRLF injection.
No validated public exploits yet. Hidden: 1 not yet analyzed, such as Exploit-DB entries.
Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.
No public activity tracked yet. Mallory keeps watching.
No public activity observed for this vulnerability.