Ruby Net::IMAP <=0.6.4 MITM Without TLS on starttls
CVE-2026-42246 Published on May 9, 2026
net-imap vulnerable to STARTTLS stripping via invalid response timing
Net::IMAP implements Internet Message Access Protocol (IMAP) client functionality in Ruby. Prior to versions 0.3.10, 0.4.24, 0.5.14, and 0.6.4, a man-in-the-middle attacker can cause Net::IMAP#starttls to return "successfully", without starting TLS. This issue has been patched in versions 0.3.10, 0.4.24, 0.5.14, and 0.6.4.
Vulnerability Analysis
CVE-2026-42246 is exploitable with network access, and does not require authorization privileges or user interaction. This vulnerability is consided to have a high level of attack complexity. The potential impact of an exploit of this vulnerability is considered to have a high impact on confidentiality and integrity, and no impact on availability.
Weakness Types
Missing Report of Error Condition
The software encounters an error but does not provide a status code or return value to indicate that an error has occurred.
Return of Wrong Status Code
A function or operation returns an incorrect return value or status code that does not indicate an error, but causes the product to modify its behavior based on the incorrect result. This can lead to unpredictable behavior. If the function is used to make security-critical decisions or provide security-critical information, then the wrong status code can cause the software to assume that an action is safe, even when it is not.
Improper Check for Unusual or Exceptional Conditions
The software does not check or incorrectly checks for unusual or exceptional conditions that are not expected to occur frequently during day to day operation of the software.
What is a Failing Open Vulnerability?
When the product encounters an error condition or failure, its design requires it to fall back to a state that is less secure than other options that are available, such as selecting the weakest encryption algorithm or using the most permissive access control restrictions. By entering a less secure state, the product inherits the weaknesses associated with that state, making it easier to compromise. At the least, it causes administrators to have a false sense of security. This weakness typically occurs as a result of wanting to "fail functional" to minimize administration and support costs, instead of "failing safe."
CVE-2026-42246 has been classified to as a Failing Open vulnerability or weakness.
Improper Enforcement of Behavioral Workflow
The software supports a session in which more than one behavior must be performed by an actor, but it does not properly ensure that the actor performs the behaviors in the required sequence.
Missing Cryptographic Step
The product does not implement a required step in a cryptographic algorithm, resulting in weaker encryption than advertised by the algorithm.
Products Associated with CVE-2026-42246
You can be notified by email with stack.watch whenever vulnerabilities like CVE-2026-42246 are published in these products:
Affected Versions
ruby net-imap:- Version < 0.3.10 is affected.
- Version >= 0.4.0, < 0.4.24 is affected.
- Version >= 0.5.0, < 0.5.14 is affected.
- Version >= 0.6.0, < 0.6.4 is affected.
- Version 0:4.0.3-35.el10_2 and below * is unaffected.
- Version 0:3.3.10-13.el10_2 and below * is unaffected.
- Version 0:3.3.10-11.el10_0.2 and below * is unaffected.
- Version 0:2.0.0.648-39.el7_9.1 and below * is unaffected.
- Version 8100020260615131019.489197e6 and below * is unaffected.
- Version 8100020260615131010.489197e6 and below * is unaffected.
- Version 8040020260630124058.522a0ee4 and below * is unaffected.
- Version 8040020260630124058.522a0ee4 and below * is unaffected.
- Version 8060020260630123825.ad008a3a and below * is unaffected.
- Version 8060020260630123825.ad008a3a and below * is unaffected.
- Version 8080020260625114827.63b34585 and below * is unaffected.
- Version 8080020260625114827.63b34585 and below * is unaffected.
- Version 0:3.0.7-167.el9_8 and below * is unaffected.
- Version 9080020260615131001.9 and below * is unaffected.
- Version 9080020260619130154.9 and below * is unaffected.
- Version 0:3.0.4-161.el9_2.3 and below * is unaffected.
- Version 0:3.0.7-162.el9_4.3 and below * is unaffected.
- Version 9040020260630065449.9 and below * is unaffected.
- Version 0:3.0.7-165.el9_6.1 and below * is unaffected.
- Version 9060020260630075016.9 and below * is unaffected.
- Version 4.0.0-33.4.hum1 and below * is unaffected.
- Version 3.4.10-31.hum1 and below * is unaffected.
- Version 3.4.8-31.2.hum1 and below * is unaffected.
- Version 3.3.10-23.2.hum1 and below * is unaffected.
Exploit Probability
EPSS (Exploit Prediction Scoring System) scores estimate the probability that a vulnerability will be exploited in the wild within the next 30 days. The percentile shows you how this score compares to all other vulnerabilities.