CRLF Injection Affecting net-imap package, versions <0.4.24>=0.5.0, <0.5.14>=0.6.0, <0.6.4


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.02% (4th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about CRLF Injection vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-RUBY-NETIMAP-16420122
  • published6 May 2026
  • disclosed4 May 2026
  • creditmanunio

Introduced: 4 May 2026

NewCVE-2026-42257  (opens in a new tab)
CWE-77  (opens in a new tab)
CWE-93  (opens in a new tab)

How to fix?

Upgrade net-imap to version 0.4.24, 0.5.14, 0.6.4 or higher.

Overview

Affected versions of this package are vulnerable to CRLF Injection via the handling of raw string arguments in commands such as uid_search, search, uid_fetch, fetch, uid_store, store, and setquota. A user can execute arbitrary IMAP commands by injecting specially crafted input containing CRLF sequences.

Workaround

This vulnerability can be mitigated by validating string inputs for search criteria and fetch attributes to ensure they do not contain \r or \n characters, hard-coding the store attr argument, restricting user-controlled inputs to a safe enumerated list, and using Kernel#Integer to validate inputs for the setquota limit.

CVSS Base Scores

version 4.0
version 3.1