Improper Enforcement of Behavioral Workflow Affecting net-imap package, versions <0.3.10>=0.4.0, <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 IDSNYK-RUBY-NETIMAP-16420230
  • published6 May 2026
  • disclosed4 May 2026
  • creditMasamune

Introduced: 4 May 2026

NewCVE-2026-42246  (opens in a new tab)
CWE-392  (opens in a new tab)
CWE-393  (opens in a new tab)
CWE-636  (opens in a new tab)
CWE-754  (opens in a new tab)
CWE-841  (opens in a new tab)

How to fix?

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

Overview

Affected versions of this package are vulnerable to Improper Enforcement of Behavioral Workflow via the starttls function. An attacker can intercept and manipulate the communication by injecting a crafted response before the client completes sending the command, causing the connection to remain unencrypted and potentially exposing sensitive information in cleartext.

Note: This is only exploitable if the client does not explicitly verify the TLS status after attempting to initiate a secure connection.

Workaround

This vulnerability can be mitigated by explicitly verifying the TLS status using the tls_verified? method after initiating the secure connection, or by connecting directly to an implicit TLS port instead of using STARTTLS.

CVSS Base Scores

version 4.0
version 3.1