EXPOSURES › CVE-2026-42257
CVE-2026-42257
CRITICALCVE-2026-42257 in Ruby's Net::IMAP allows CRLF injection via unvalidated user input, enabling arbitrary IMAP command execution.
The Ruby Net::IMAP library failed to validate raw string arguments sent to the IMAP server, allowing attackers to inject CRLF sequences and execute arbitrary commands. DIB organizations using Ruby-based mail clients must patch to versions 0.4.24, 0.5.14, or 0.6.4 immediately to prevent remote code execution and data exfiltration through compromised mail servers.
Shame score — A critical CVE with a CVSS score of 9.8 that enables remote code execution through a fundamental lack of input validation in a widely used library.
▸ RECOMMENDED ACTION Remote code execution — patch the affected products on priority.
Net::IMAP implements Internet Message Access Protocol (IMAP) client functionality in Ruby. Prior to versions 0.4.24, 0.5.14, and 0.6.4, several Net::IMAP commands accept a raw string argument that is sent to the server without validation or escaping. If this string is derived from user-controlled input, it may contain contain CRLF sequences, which an attacker can use to inject arbitrary IMAP commands. This issue has been patched in versions 0.4.24, 0.5.14, and 0.6.4.