{"id":"CVE-2026-42246","aliases":["CVE-2026-42246","GHSA-vcgp-9326-pqcp"],"related":[],"kind":"vulnerability","state":"published","title":"net-imap vulnerable to STARTTLS stripping via invalid response timing","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"### Summary\n\nA man-in-the-middle attacker can cause `Net::IMAP#starttls` to return \"successfully\", without starting TLS.\n\n### Details\n\nWhen using `Net::IMAP#starttls` to upgrade a plaintext connection to use TLS, a man-in-the-middle attacker can inject a tagged `OK` response with an easily predictable tag.  By sending the response before the client finishes sending the command, the command completes \"successfully\" before the response handler is registered.  This allows `#starttls` to return without error, but the response handler is never invoked, the TLS connection is never established, and the socket remains unencrypted.\n\nThis allows man-in-the-middle attackers to perform a STARTTLS stripping attack, unless the client code explicitly checks `Net::IMAP#tls_verified?`.\n\n### Impact\n\nTLS bypass, leading to cleartext transmission of sensitive information.\n\n### Mitigation\n\n* Upgrade to a patched version of net-imap that raises an exception whenever `#starttls` does not establish TLS.\n* Connect to an implicit TLS port, rather than use `STARTTLS` with a cleartext port.\n  This is strongly recommended anyway:\n  * [RFC 8314](https://www.rfc-editor.org/info/rfc8314): Cleartext Considered Obsolete: Use of Transport Layer Security (TLS) for Email Submission and Access\n  * [NO STARTTLS](https://nostarttls.secvuln.info/): Why TLS is better without STARTTLS, A Security Analysis of STARTTLS in the Email Context\n* Explicitly verify `Net::IMAP#tls_verified?` is `true`, before using the connection after `#starttls`.","format":"markdown","source":"ghsa"},{"lang":"es","text":"Net::IMAP implementa la funcionalidad de cliente del Protocolo de Acceso a Mensajes de Internet (IMAP) en Ruby. Antes de las versiones 0.3.10, 0.4.24, 0.5.14 y 0.6.4, un atacante man-in-the-middle puede hacer que Net::IMAP#starttls devuelva 'satisfactoriamente', sin iniciar TLS. Este problema ha sido parcheado en las versiones 0.3.10, 0.4.24, 0.5.14 y 0.6.4.","source":"nvd"}],"published":"2026-05-04T22:01:52.000Z","modified":"2026-09-10T03:50:47.706Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N","score":7.6,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N","score":7.6,"rating":"HIGH"},{"scorer":"redhat-SADP","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N","score":7.4,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N","rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N","score":7.4,"rating":"HIGH"}],"cwes":["CWE-325","CWE-392","CWE-393","CWE-636","CWE-754","CWE-841"],"affected":[{"ranges":[{"version":"< 0.3.10","status":"affected"},{"version":">= 0.4.0, < 0.4.24","status":"affected"},{"version":">= 0.5.0, < 0.5.14","status":"affected"},{"version":">= 0.6.0, < 0.6.4","status":"affected"}],"vendor":"ruby","product":"net-imap","source":"cvelist"},{"ranges":[{"type":"rpm","introduced":"0:4.0.3-35.el10_2","fixed":"*","status":"unaffected"}],"vendor":"Red Hat","product":"Red Hat Enterprise Linux 10","package":"ruby4.0","cpe":"cpe:/o:redhat:enterprise_linux:10.2","source":"cvelist"},{"ranges":[{"type":"rpm","introduced":"0:3.3.10-13.el10_2","fixed":"*","status":"unaffected"}],"vendor":"Red Hat","product":"Red Hat Enterprise Linux 10","package":"ruby","cpe":"cpe:/o:redhat:enterprise_linux:10.2","source":"cvelist"},{"ranges":[{"type":"rpm","introduced":"0:3.3.10-11.el10_0.2","fixed":"*","status":"unaffected"}],"vendor":"Red Hat","product":"Red Hat Enterprise Linux 10.0 Extended Update Support","package":"ruby","cpe":"cpe:/o:redhat:enterprise_linux_eus:10.0","source":"cvelist"},{"ranges":[{"type":"rpm","introduced":"0:2.0.0.648-39.el7_9.1","fixed":"*","status":"unaffected"}],"vendor":"Red Hat","product":"Red Hat Enterprise Linux 7 Extended Lifecycle Support","package":"ruby","cpe":"cpe:/o:redhat:rhel_els:7","source":"cvelist"},{"ranges":[{"type":"rpm","introduced":"8100020260615131019.489197e6","fixed":"*","status":"unaffected"}],"vendor":"Red Hat","product":"Red Hat Enterprise Linux 8","package":"ruby:2.5","cpe":"cpe:/a:redhat:enterprise_linux:8","source":"cvelist"},{"ranges":[{"type":"rpm","introduced":"8100020260615131010.489197e6","fixed":"*","status":"unaffected"}],"vendor":"Red Hat","product":"Red Hat Enterprise Linux 8","package":"ruby:3.3","cpe":"cpe:/a:redhat:enterprise_linux:8","source":"cvelist"},{"ranges":[{"type":"rpm","introduced":"8040020260630124058.522a0ee4","fixed":"*","status":"unaffected"}],"vendor":"Red Hat","product":"Red Hat Enterprise Linux 8.4 Advanced Mission Critical Update Support","package":"ruby:2.5","cpe":"cpe:/a:redhat:rhel_aus:8.4","source":"cvelist"},{"ranges":[{"type":"rpm","introduced":"8040020260630124058.522a0ee4","fixed":"*","status":"unaffected"}],"vendor":"Red Hat","product":"Red Hat Enterprise Linux 8.4 Extended Update Support Long-Life Add-On","package":"ruby:2.5","cpe":"cpe:/a:redhat:rhel_eus_long_life:8.4","source":"cvelist"},{"ranges":[{"type":"rpm","introduced":"8060020260630123825.ad008a3a","fixed":"*","status":"unaffected"}],"vendor":"Red Hat","product":"Red Hat Enterprise Linux 8.6 Advanced Mission Critical Update Support","package":"ruby:2.5","cpe":"cpe:/a:redhat:rhel_aus:8.6","source":"cvelist"},{"ranges":[{"type":"rpm","introduced":"8060020260630123825.ad008a3a","fixed":"*","status":"unaffected"}],"vendor":"Red Hat","product":"Red Hat Enterprise Linux 8.6 Extended Update Support Long-Life Add-On","package":"ruby:2.5","cpe":"cpe:/a:redhat:rhel_eus_long_life:8.6","source":"cvelist"},{"ranges":[{"type":"rpm","introduced":"8080020260625114827.63b34585","fixed":"*","status":"unaffected"}],"vendor":"Red Hat","product":"Red Hat Enterprise Linux 8.8 Telecommunications Update Service","package":"ruby:2.5","cpe":"cpe:/a:redhat:rhel_tus:8.8","source":"cvelist"},{"ranges":[{"type":"rpm","introduced":"8080020260625114827.63b34585","fixed":"*","status":"unaffected"}],"vendor":"Red Hat","product":"Red Hat Enterprise Linux 8.8 Update Services for SAP Solutions","package":"ruby:2.5","cpe":"cpe:/a:redhat:rhel_e4s:8.8","source":"cvelist"},{"ranges":[{"type":"rpm","introduced":"0:3.0.7-167.el9_8","fixed":"*","status":"unaffected"}],"vendor":"Red Hat","product":"Red Hat Enterprise Linux 9","package":"ruby","cpe":"cpe:/a:redhat:enterprise_linux:9","source":"cvelist"},{"ranges":[{"type":"rpm","introduced":"9080020260615131001.9","fixed":"*","status":"unaffected"}],"vendor":"Red Hat","product":"Red Hat Enterprise Linux 9","package":"ruby:3.3","cpe":"cpe:/a:redhat:enterprise_linux:9","source":"cvelist"},{"ranges":[{"type":"rpm","introduced":"9080020260619130154.9","fixed":"*","status":"unaffected"}],"vendor":"Red Hat","product":"Red Hat Enterprise Linux 9","package":"ruby:4.0","cpe":"cpe:/a:redhat:enterprise_linux:9","source":"cvelist"},{"ranges":[{"type":"rpm","introduced":"0:3.0.4-161.el9_2.3","fixed":"*","status":"unaffected"}],"vendor":"Red Hat","product":"Red Hat Enterprise Linux 9.2 Update Services for SAP Solutions","package":"ruby","cpe":"cpe:/a:redhat:rhel_e4s:9.2","source":"cvelist"},{"ranges":[{"type":"rpm","introduced":"0:3.0.7-162.el9_4.3","fixed":"*","status":"unaffected"}],"vendor":"Red Hat","product":"Red Hat Enterprise Linux 9.4 Update Services for SAP Solutions","package":"ruby","cpe":"cpe:/a:redhat:rhel_e4s:9.4","source":"cvelist"},{"ranges":[{"type":"rpm","introduced":"9040020260630065449.9","fixed":"*","status":"unaffected"}],"vendor":"Red Hat","product":"Red Hat Enterprise Linux 9.4 Update Services for SAP Solutions","package":"ruby:3.3","cpe":"cpe:/a:redhat:rhel_e4s:9.4","source":"cvelist"},{"ranges":[{"type":"rpm","introduced":"0:3.0.7-165.el9_6.1","fixed":"*","status":"unaffected"}],"vendor":"Red Hat","product":"Red Hat Enterprise Linux 9.6 Extended Update Support","package":"ruby","cpe":"cpe:/a:redhat:rhel_eus:9.6","source":"cvelist"},{"ranges":[{"type":"rpm","introduced":"9060020260630075016.9","fixed":"*","status":"unaffected"}],"vendor":"Red Hat","product":"Red Hat Enterprise Linux 9.6 Extended Update Support","package":"ruby:3.3","cpe":"cpe:/a:redhat:rhel_eus:9.6","source":"cvelist"},{"ranges":[{"type":"rpm","introduced":"4.0.0-33.4.hum1","fixed":"*","status":"unaffected"}],"vendor":"Red Hat","product":"Red Hat Hardened Images","package":"ruby4-0-main","cpe":"cpe:/a:redhat:hummingbird:1","source":"cvelist"},{"ranges":[{"type":"rpm","introduced":"3.4.10-31.hum1","fixed":"*","status":"unaffected"},{"type":"rpm","introduced":"3.4.8-31.2.hum1","fixed":"*","status":"unaffected"}],"vendor":"Red Hat","product":"Red Hat Hardened Images","package":"ruby3-4-main","cpe":"cpe:/a:redhat:hummingbird:1","source":"cvelist"},{"ranges":[{"type":"rpm","introduced":"3.3.10-23.2.hum1","fixed":"*","status":"unaffected"}],"vendor":"Red Hat","product":"Red Hat Hardened Images","package":"ruby3-3-main","cpe":"cpe:/a:redhat:hummingbird:1","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat 3scale API Management Platform 2","package":"3scale-amp21/system","cpe":"cpe:/a:redhat:red_hat_3scale_amp:2","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat 3scale API Management Platform 2","package":"3scale-amp21/zync","cpe":"cpe:/a:redhat:red_hat_3scale_amp:2","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat 3scale API Management Platform 2","package":"3scale-amp22/system","cpe":"cpe:/a:redhat:red_hat_3scale_amp:2","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat 3scale API Management Platform 2","package":"3scale-amp22/zync","cpe":"cpe:/a:redhat:red_hat_3scale_amp:2","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat 3scale API Management Platform 2","package":"3scale-amp2/system-rhel7","cpe":"cpe:/a:redhat:red_hat_3scale_amp:2","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat 3scale API Management Platform 2","package":"3scale-amp2/system-rhel8","cpe":"cpe:/a:redhat:red_hat_3scale_amp:2","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat 3scale API Management Platform 2","package":"3scale-amp2/system-rhel9","cpe":"cpe:/a:redhat:red_hat_3scale_amp:2","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat 3scale API Management Platform 2","package":"3scale-amp2/zync-rhel8","cpe":"cpe:/a:redhat:red_hat_3scale_amp:2","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat 3scale API Management Platform 2","package":"3scale-amp2/zync-rhel9","cpe":"cpe:/a:redhat:red_hat_3scale_amp:2","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat Enterprise Linux 6","package":"ruby","cpe":"cpe:/o:redhat:enterprise_linux:6","source":"cvelist"},{"ranges":[],"vendor":"Red Hat","product":"Red Hat OpenShift Container Platform 4","package":"openshift/ose-rhel-coreos-9","cpe":"cpe:/a:redhat:openshift:4","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0.6.0","status":"affected","fixed":"0.6.4"}],"ecosystem":"RubyGems","package":"net-imap","purl":"pkg:gem/net-imap","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0.5.0","status":"affected","fixed":"0.5.14"}],"ecosystem":"RubyGems","package":"net-imap","purl":"pkg:gem/net-imap","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0.4.0","status":"affected","fixed":"0.4.24"}],"ecosystem":"RubyGems","package":"net-imap","purl":"pkg:gem/net-imap","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"0.3.10"}],"ecosystem":"RubyGems","package":"net-imap","purl":"pkg:gem/net-imap","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"0.3.10"},{"status":"affected","introduced":"0.4.0","fixed":"0.4.24"},{"status":"affected","introduced":"0.5.0","fixed":"0.5.14"},{"status":"affected","introduced":"0.6.0","fixed":"0.6.4"}],"vendor":"ruby-lang","product":"net::imap","cpe":"cpe:2.3:a:ruby-lang:net\\:\\:imap:*:*:*:*:*:ruby:*:*","source":"nvd"}],"references":[{"url":"https://github.com/ruby/net-imap/security/advisories/GHSA-vcgp-9326-pqcp","tags":["mitigation","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/ruby/net-imap/commit/0ede4c40b1523dfeaf95777b2678e54cc0fd9618","tags":["patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/ruby/net-imap/commit/24a4e770b43230286a05aa2a9746cdbb3eb8485e","tags":["patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/ruby/net-imap/commit/97e2488fb5401a1783bddd959dde007d9fbce42c","tags":["patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/ruby/net-imap/commit/f79d35bf5833f186e81044c57c843eda30c873da","tags":["patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/ruby/net-imap/releases/tag/v0.3.10","tags":["release-notes","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/ruby/net-imap/releases/tag/v0.4.24","tags":["release-notes","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/ruby/net-imap/releases/tag/v0.5.14","tags":["release-notes","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://access.redhat.com/security/cve/CVE-2026-42246","tags":["vdb-entry","x-refsource-redhat"],"sources":["cvelist","nvd"]},{"url":"https://bugzilla.redhat.com/show_bug.cgi?id=2468499","tags":["issue-tracking","x-refsource-redhat"],"sources":["cvelist","nvd"]},{"url":"https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-42246.json","tags":["x-sadp-csaf-vex"],"sources":["cvelist","nvd"]},{"url":"https://access.redhat.com/errata/RHSA-2026:37397","tags":["vendor-advisory","x-refsource-redhat"],"sources":["cvelist","nvd"]},{"url":"https://access.redhat.com/errata/RHSA-2026:35895","tags":["vendor-advisory","x-refsource-redhat"],"sources":["cvelist","nvd"]},{"url":"https://access.redhat.com/errata/RHSA-2026:33565","tags":["vendor-advisory","x-refsource-redhat"],"sources":["cvelist","nvd"]},{"url":"https://access.redhat.com/errata/RHSA-2026:33540","tags":["vendor-advisory","x-refsource-redhat"],"sources":["cvelist","nvd"]},{"url":"https://access.redhat.com/errata/RHSA-2026:33514","tags":["vendor-advisory","x-refsource-redhat"],"sources":["cvelist","nvd"]},{"url":"https://access.redhat.com/errata/RHSA-2026:33515","tags":["vendor-advisory","x-refsource-redhat"],"sources":["cvelist","nvd"]},{"url":"https://access.redhat.com/errata/RHSA-2026:35866","tags":["vendor-advisory","x-refsource-redhat"],"sources":["cvelist","nvd"]},{"url":"https://access.redhat.com/errata/RHSA-2026:35867","tags":["vendor-advisory","x-refsource-redhat"],"sources":["cvelist","nvd"]},{"url":"https://access.redhat.com/errata/RHSA-2026:34076","tags":["vendor-advisory","x-refsource-redhat"],"sources":["cvelist","nvd"]},{"url":"https://access.redhat.com/errata/RHSA-2026:35834","tags":["vendor-advisory","x-refsource-redhat"],"sources":["cvelist","nvd"]},{"url":"https://access.redhat.com/errata/RHSA-2026:33630","tags":["vendor-advisory","x-refsource-redhat"],"sources":["cvelist","nvd"]},{"url":"https://access.redhat.com/errata/RHSA-2026:36099","tags":["vendor-advisory","x-refsource-redhat"],"sources":["cvelist","nvd"]},{"url":"https://access.redhat.com/errata/RHSA-2026:33462","tags":["vendor-advisory","x-refsource-redhat"],"sources":["cvelist","nvd"]},{"url":"https://access.redhat.com/errata/RHSA-2026:37238","tags":["vendor-advisory","x-refsource-redhat"],"sources":["cvelist","nvd"]},{"url":"https://access.redhat.com/errata/RHSA-2026:33512","tags":["vendor-advisory","x-refsource-redhat"],"sources":["cvelist","nvd"]},{"url":"https://access.redhat.com/errata/RHSA-2026:33576","tags":["vendor-advisory","x-refsource-redhat"],"sources":["cvelist","nvd"]},{"url":"https://access.redhat.com/errata/RHSA-2026:33577","tags":["vendor-advisory","x-refsource-redhat"],"sources":["cvelist","nvd"]},{"url":"https://access.redhat.com/errata/RHSA-2026:33721","tags":["vendor-advisory","x-refsource-redhat"],"sources":["cvelist","nvd"]},{"url":"https://access.redhat.com/errata/RHSA-2026:33552","tags":["vendor-advisory","x-refsource-redhat"],"sources":["cvelist","nvd"]},{"url":"https://access.redhat.com/errata/RHSA-2026:33551","tags":["vendor-advisory","x-refsource-redhat"],"sources":["cvelist","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-42246","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/ruby/net-imap","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/ruby/net-imap/releases/tag/v0.6.4","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/rubysec/ruby-advisory-db/blob/master/gems/net-imap/CVE-2026-42246.yml","tags":["web"],"sources":["ghsa"]},{"url":"https://nostarttls.secvuln.info","tags":["web"],"sources":["ghsa"]},{"url":"https://www.rfc-editor.org/info/rfc8314","tags":["web"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"total","date":"2026-05-12T02:29:05.120Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-42246","url":"https://www.cve.org/CVERecord?id=CVE-2026-42246","licence":"CVE Terms of Use","modified":"2026-08-24T12:06:55.143Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-vcgp-9326-pqcp","url":"https://github.com/advisories/GHSA-vcgp-9326-pqcp","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:47.706Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-42246","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-42246","licence":"Public domain","modified":"2026-08-24T13:18:41.420Z"}],"updatedAt":"2026-11-25T22:59:21.148Z","epss":{"score":0.00312,"percentile":0.26063,"date":"2026-12-01T12:00:22.000Z"}}