Releases: ruby/net-imap
Release list
v0.6.6
What's Changed
Fixed
- 🐛 Fix incorrect regexp for testing if string is quotable by @nevans in #723
This bug was introduced by v0.6.5 as part of #712.
It causes some valid string arguments (which should be sent as IMAPliteralvalues) to raise aDataFormatErrorexception (without sending).
Full Changelog: v0.6.5...v0.6.6
v0.6.5
What's Changed
Added
- 🧵 Add thread join timeout to
#disconnectby @nevans in #689 - ✨ Add
#utf8_enabled?by @nevans in #715 - ✨ Remember set of enabled server capabilities by @nevans in #716
Adds#enabledand#enabled?methods.
Fixed
- 🥅 Fix premature tagged response guard for IDLE by @nevans in #688
- 🥅 Test for NULL bytes before sending string args by @nevans in #712
- 🐛 Use literal syntax for invalid UTF8 or non-UTF8 strings by @nevans in #713
Other Changes
- 🧵🥅 Reraise receiver thread errors with caller's backtrace by @nevans in #691
- 🧵🥅 Reraise
#starttlsreceiver thread errors with caller's backtrace by @nevans in #711 - ♻️ Extract InvalidTaggedResponseError error by @nevans in #687
- 🧵 Refactor thread synchronization for sending commands by @nevans in #692
- 🧵Refactor receive responses thread sync by @nevans in #694
- ♻️ Extract
handle_responsefromreceive_responsesby @nevans in #695
Miscellaneous
- 🔀 Merge v0.6.4.1 patches by @nevans in #702
- Fix flaky test_starttls_stripping_ok_sent_before_response by @hsbt in #709
- ⬆️ Bump actions/checkout from 6 to 7 by @dependabot[bot] in #708
- ✅⚡ Faster tests by @nevans in #714
- Pin simplecov version by @nobu in #717
- simplecov-{html,json} have been incorporated in SimpleCov 1.0.0 by @nobu in #718
- ⬆️ Bump step-security/harden-runner from 2.19.4 to 2.20.0 by @dependabot[bot] in #719
- ✅ Fix issues with simplecov v1.0 upgrade by @nevans in #721
Full Changelog: v0.6.4.1...v0.6.5
v0.4.25
Important
The 0.4.x release branch will only receive security fixes, and will be unsupported when ruby 3.3 is EOL.
Please upgrade to a newer version.
What's Changed
Special thanks to @hsbt for backporting most of these PRs, in #707!
🔒 Security
This release fixes several more security vulnerabilities which are related to the fixes in v0.4.24. Please see the linked security advisories for more information.
- (moderate) Command Injection via non-synchronizing literal in "raw" argument (CVE-2026-47240, GHSA-8p34-64r3-mwg8)
This vulnerability depends how the server interprets non-synchronizing literals.
The connection is not vulnerable if the server supports non-synchronizing literals.- 🥅 Validate non-synchronizing literals support (backports #701)
- (moderate) Command Injection via unvalidated ID and ENABLE arguments (CVE-2026-47242, GHSA-46q3-7gv7-qmgg)
- (low) Denial of Service via incomplete "raw" argument validation (CVE-2026-47241, GHSA-c4fp-cxrr-mj66)
This results in the affected command hanging until the connection is closed. If another thread attempts to send a concurrent pipelined command, the first thread will return with a syntax error and the second thread will hang until the connection closes.
Fixed
- Remove dead code resulting from cherry-pick of 6f82e28. by @jackorp in #706
- 🏷️ Allow 64-bit Integer arguments (backports #675)
- 🥅 Validate that Atom and Flag are not empty (backports #684)
- 🧵 Fix deadlock in
#disconnect(backports #686)
Documentation
⚠️ Boost visibility of raw data argument documentation warnings (backports #677)
Other Changes
- 🧵 Close socket in #disconnect before waiting for lock & thread join (backports #493)
- 🥅 Ensure send_number_data input is an Integer (backports #676)
- ♻️ Improve
RawData.new, AddRawData.split(backports #679) - 🥅 Validate response literal byte size format (backports #681)
Miscellaneous
- ✅ Fix flaky tests with
FakeServer#Connection#closemutex (backports half of #520 - ✅ Improvements to tests' FakeServer (backports #678)
- Backport the security fixes to v0.4 for a 0.4.25 release by @hsbt in #707
New Contributors
Full Changelog: v0.4.24...v0.4.25
v0.6.4.1
What's Changed
🔒 Security
This release fixes several more security vulnerabilities which are related to the fixes in v0.6.4. Please see the linked security advisories for more information.
- (moderate) Command Injection via non-synchronizing literal in "raw" argument (CVE-2026-47240, GHSA-8p34-64r3-mwg8)
This vulnerability depends how the server interprets non-synchronizing literals.
The connection is not vulnerable if the server supports non-synchronizing literals. - (moderate) Command Injection via unvalidated ID and ENABLE arguments (CVE-2026-47242, GHSA-46q3-7gv7-qmgg)
- (low) Denial of Service via incomplete "raw" argument validation (CVE-2026-47241, GHSA-c4fp-cxrr-mj66)
This results in the affected command hanging until the connection is closed. If another thread attempts to send a concurrent pipelined command, the first thread will return with a syntax error and the second thread will hang until the connection closes.
Added
Fixed
- 🔧 Disallow
config.max_non_synchronizing_literal = nilby @nevans in #672 - 🧵 Fix deadlock in
#disconnectby @nevans in #686 - 🥅 Validate that Atom and Flag are not empty by @nevans in #684
Documentation
Other Changes
- 🏷️ Allow 64-bit Integer arguments by @nevans in #675
- 🥅 Ensure send_number_data input is an Integer by @nevans in #676
- ♻️ Improve
RawData.new, AddRawData.splitby @nevans in #679 - 🏷️ Less strict number string coercion, to match RFCs by @nevans in #680
- 🥅 Validate response literal byte size format by @nevans in #681
Miscellaneous
- ⬆️ Bump step-security/harden-runner from 2.19.0 to 2.19.1 by @dependabot[bot] in #673
- ✅ Improvements to tests' FakeServer by @nevans in #678
- ⬆️ Bump step-security/harden-runner from 2.19.1 to 2.19.3 by @dependabot[bot] in #682
- ⬆️ Bump step-security/harden-runner from 2.19.3 to 2.19.4 by @dependabot[bot] in #683
Full Changelog: v0.6.4...v0.6.4.1
v0.5.15
What's Changed
🔒 Security
This release fixes several more security vulnerabilities which are related to the fixes in v0.5.14. Please see the linked security advisories for more information.
- (moderate) Command Injection via non-synchronizing literal in "raw" argument (CVE-2026-47240, GHSA-8p34-64r3-mwg8)
This vulnerability depends how the server interprets non-synchronizing literals.
The connection is not vulnerable if the server supports non-synchronizing literals. - (moderate) Command Injection via unvalidated ID and ENABLE arguments (CVE-2026-47242, GHSA-46q3-7gv7-qmgg)
- (low) Denial of Service via incomplete "raw" argument validation (CVE-2026-47241, GHSA-c4fp-cxrr-mj66)
This results in the affected command hanging until the connection is closed. If another thread attempts to send a concurrent pipelined command, the first thread will return with a syntax error and the second thread will hang until the connection closes.
Fixed
- 🥅 Validate that Atom and Flag are not empty by @nevans in #685 (backports #684)
- 🧵 Fix deadlock in
#disconnectby @nevans in #697 (backports #686)
Documentation
Other Changes
- 🏷️ Allow 64-bit Integer arguments in #696 (backports #675)
- 🥅 Ensure send_number_data input is an Integer in #696 (backports #676)
- ♻️ Improve
RawData.new, AddRawData.splitby @nevans in #696 (backports #679) - 🥅 Validate response literal byte size format by @nevans in #696 (backports #681)
Miscellaneous
Full Changelog: v0.5.14...v0.5.15
v0.6.4
What's Changed
🔒 Security
This release contains fixes for multiple vulnerabilities concerning STARTTLS stripping, argument validation, and denial of service attacks.
Warning
#664 fixes a STARTTLS stripping vulnerability (GHSA-vcgp-9326-pqcp).
Without this fix, a man-in-the-middle attacker can cause Net::IMAP#starttls to return "successfully", without starting TLS.
Important
Argument validation is significantly improved. Several injection vulnerabilities have been fixed:
#657 fixes CRLF/command/argument injection via Symbol arguments (GHSA-75xq-5h9v-w6px).
#658 fixes CRLF/command/argument injection via the attr argument to #store/#uid_store (GHSA-hm49-wcqc-g2xg)
#659 fixes CRLF/command/argument injection via the storage_limit argument to #setquota (GHSA-hm49-wcqc-g2xg).
#660 fixes CRLF/command injection via RawData (GHSA-hm49-wcqc-g2xg):
#searchand#uid_searchsendcriteriaas raw data, when it is a String#fetchand#uid_fetchsendattras raw data, when it is a String.
Whenattris an Array, its String members are sent as raw data.
Caution
RawData does not defend against other forms of argument injection! It is an intentionally low-level API.
Note
Two denial of service vulnerabilities have been addressed.
These are generally only relevant when connecting to an untrusted hostile server (or without TLS).
#642 fixes quadratic time complexity when reading large responses containing many string literals (GHSA-q2mw-fvj9-vvcw).
#654 adds a configurable max_iterations count for SCRAM-* authentication (GHSA-87pf-fpwv-p7m7).
The default ScramAuthenticator#max_iterations is 2**31 - 1 (max 32-bit signed int), which was already OpenSSL's maximum value. It provides no protection against hostile servers unless it is explicitly set to a lower value by the user.
Breaking Changes
- ⚡
ResponseReadermemoizesConfig#max_response_sizein #642.
Changes to#max_response_sizenow take effect once per response, not on everyIO#read.
NOTE: It is not expected that this will affect any current usage. See the PR for details.
Added
- ✨ Support
BINARYextention to#append(RFC3516) by @nevans in #616 - ✨ Support
LITERAL+andLITERAL-non-synchronizing literals (RFC7888) by @nevans in #649 - 🔒 Add
ScramAuthenticator#max_iterationsby @nevans in #654 - 🏷️ Add
number64andnz-number64to NumValidator by @nevans in #625 - ♻️ Add
MailboxQuota#quota_rootalias by @nevans in #636 - 🔍 Simplify
Net::IMAP#inspectwith basic state by @nevans in #612 - 🥅 Add
ResponseParseError#parser_methods(and override#==) by @nevans in #615
Fixed
- 🔒 Fix STARTTLS stripping vulnerability in #664, reported by @Masamuneee
- Argument validation, reported by @manunio
- ⚡ Much faster ResponseReader performance by @nevans in #642
- 🥅 Successfully parse invalid response code data by @nevans in #614
- Fix JRuby SSL connection failure: use
SSLContext#setupinstead of#freezeby @idahomst in #627 - 🐛 Fix InvalidResponseError in
#get_tagged_responseby @nevans in #633 - Pass an Exception to #raise by @eregon in #643
- 🐛 Fix empty
SearchResult#to_sequence_setin #644, reported by @Quintasan - 🐛 Wait to continue RawData literals by @nevans in #660
Documentation
- 📚 Fix rdoc 7.2 compatibility (section bugfix) by @nevans in #617
- 📚 Switch back to rdoc's darkfish generator (🚧TMP) by @nevans in #618
- 📚 Use
.documentand.rdoc_optionsfiles, where possible by @nevans in #619 - Update README example: Expunge is implicit in MOVE by @sebbASF in #623
- 📚️ Fix QUOTA documentation by @nevans in #636
- 📚 Minor documentation fixes by @nevans in #638
- 📚 Improve documentation of RawData arguments by @nevans in #661
Other Changes
- Handle deep response recursion as ResponseParseError by @Masamuneee in #629
Miscellaneous
- ✅ Fix typo in FakeServer (tests only) by @nevans in #620
- ⬆️ Bump step-security/harden-runner from 2.14.2 to 2.15.0 by @dependabot[bot] in #621
- Bump step-security/harden-runner from 2.15.0 to 2.15.1 by @dependabot[bot] in #626
- ⬆️ Bump step-security/harden-runner from 2.15.1 to 2.16.0 by @dependabot[bot] in #628
- ⬆️ Bump actions/configure-pages from 5 to 6 by @dependabot[bot] in #635
- ✅ Test
#setquotaby @nevans in #636 - ⬆️ Bump actions/deploy-pages from 4 to 5 by @dependabot[bot] in #634
- ⬆️ Bump step-security/harden-runner from 2.16.0 to 2.17.0 by @dependabot[bot] in #639
- Test TruffleRuby release in CI for improved stability by @eregon in #640
- ⬆️ Bump actions/upload-pages-artifact from 4 to 5 by @dependabot[bot] in #646
- ⬆️ Bump step-security/harden-runner from 2.17.0 to 2.19.0 by @dependabot[bot] in #647
New Contributors
- @sebbASF made their first contribution in #623
- @idahomst made their first contribution in #627
- @Masamuneee made their first contribution in #629
- @eregon made their first contribution in #640
Full Changelog: v0.6.3...v0.6.4
v0.5.14
What's Changed
🔒 Security
This release contains fixes for multiple vulnerabilities concerning STARTTLS stripping, argument validation, and denial of service attacks.
Warning
#665 fixes a STARTTLS stripping vulnerability (GHSA-vcgp-9326-pqcp).
Without this fix, a man-in-the-middle attacker can cause Net::IMAP#starttls to return "successfully", without starting TLS.
Important
Argument validation is significantly improved. Several command injection vulnerabilities have been fixed:
#662 fixes CRLF/command/argument injection via Symbol arguments (GHSA-75xq-5h9v-w6px).
#662 fixes CRLF/command/argument injection via the attr argument to #store/#uid_store (GHSA-hm49-wcqc-g2xg)
#662 fixes CRLF/command/argument injection via the storage_limit argument to #setquota (GHSA-hm49-wcqc-g2xg).
#662 fixes CRLF/command injection via RawData (GHSA-hm49-wcqc-g2xg):
#searchand#uid_searchsendcriteriaas raw data, when it is a String#fetchand#uid_fetchsendattras raw data, when it is a String.
Whenattris an Array, its String members are sent as raw data.
Caution
RawData does not defend against other forms of argument injection! It is an intentionally low-level API.
Note
Two denial of service vulnerabilities have been addressed.
These are generally only relevant when connecting to an untrusted hostile server (or without TLS).
#650 fixes quadratic time complexity when reading large responses containing many string literals (GHSA-q2mw-fvj9-vvcw).
#656 adds a configurable max_iterations count for SCRAM-* authentication (GHSA-87pf-fpwv-p7m7).
Added
- 🔒 Add
ScramAuthenticator#max_iterations(backports #654) in #656, reported by @Masamuneee
Fixed
- 🔒 Fix STARTTLS stripping vulnerability (backports #664) in #665, reported by @Masamuneee
- 🔒 Fix CRLF injection vulnerabilities (backports #657, #658, #659, #660, #636, #661) in #662, reported by @manunio
- ⚡ Much faster ResponseReader performance (backports #642) in #650, reported by @Masamuneee
- 🐛 Config
version_defaultsshould be attr_reader (backports #594) by @nevans in #631 - 🐛 Wait to continue RawData literals (backports #660) by @nevans in #662
Other Changes
Miscellaneous
Full Changelog: v0.5.13...v0.5.14
v0.4.24
Important
The 0.4.x release branch will only receive security fixes, and will be unsupported when ruby 3.3 is EOL.
Please upgrade to a newer version.
What's Changed
🔒 Security
This release contains fixes for multiple vulnerabilities concerning STARTTLS stripping, argument validation, and denial of service attacks.
Warning
#666 fixes a STARTTLS stripping vulnerability (GHSA-vcgp-9326-pqcp).
Without this fix, a man-in-the-middle attacker can cause Net::IMAP#starttls to return "successfully", without starting TLS.
Important
Argument validation is significantly improved. Several injection vulnerabilities have been fixed:
#663 fixes CRLF/command/argument injection via Symbol arguments (GHSA-75xq-5h9v-w6px).
#663 fixes CRLF/command/argument injection via the attr argument to #store/#uid_store (GHSA-hm49-wcqc-g2xg)
#663 fixes CRLF/command/argument injection via the storage_limit argument to #setquota (GHSA-hm49-wcqc-g2xg).
#663 fixes CRLF/command injection via RawData (GHSA-hm49-wcqc-g2xg):
#searchand#uid_searchsendcriteriaas raw data, when it is a String#fetchand#uid_fetchsendattras raw data, when it is a String.
Whenattris an Array, its String members are sent as raw data.
Caution
RawData does not defend against other forms of argument injection! It is an intentionally low-level API.
Note
Two denial of service vulnerabilities have been addressed.
These are generally only relevant when connecting to an untrusted hostile server (or without TLS).
#651 fixes quadratic time complexity when reading large responses containing many string literals (GHSA-q2mw-fvj9-vvcw).
#655 adds a configurable max_iterations count for SCRAM-* authentication (GHSA-87pf-fpwv-p7m7).
The default ScramAuthenticator#max_iterations is 2**31 - 1 (max 32-bit signed int), which was already OpenSSL's maximum value. It provides no protection against hostile servers unless it is explicitly set to a lower value by the user.
Added
- 🔒 Add
ScramAuthenticator#max_iterations(backports #654) in #655, reported by @Masamuneee
Fixed
- 🔒 Fix STARTTLS stripping vulnerability (backports #664) in #666, reported by @Masamuneee
- 🔒 Fix CRLF injection vulnerabilities (backports #657, #658, #659, #660, #636, #661) in #663, reported by @manunio
- ⚡ Much faster ResponseReader performance (backports #642) in #651, reported by @Masamuneee
- 🐛 Wait to continue RawData literals (backports #660) by @nevans in #663
Other Changes
Full Changelog: v0.4.23...v0.4.24
v0.3.10
Important
0.3.10 is the final release for the 0.3.x release series. Please upgrade to a newer version.
What's Changed
🔒 Security
Warning
#667 fixes a STARTTLS stripping vulnerability (GHSA-vcgp-9326-pqcp).
Without this fix, a man-in-the-middle attacker can cause Net::IMAP#starttls to return "successfully", without starting TLS.
Fixes
- 🔒 Fix STARTTLS stripping vulnerability (backports #664, #395, #198) in #667, reported by @Masamuneee
Full Changelog: v0.3.9...v0.3.10
v0.6.3
What's Changed
Added
- 🥅 Add parser state and
#detailed_messagetoResponseParseErrorby @nevans in #599 - 🔧 Add
Config#overrides?(opposite of#inherited?) by @nevans in #610 - 🔧 Add recursive
Config#inherits_defaults?by @nevans in #611
Fixed
- 🐛 Parse
resp-textwith invalidresp-text-codeby @nevans in #601 - 🐛
Config.version_defaultsshould be read only by @nevans in #594
Other Changes
- 🥅 Only print parser debug for unhandled errors by @nevans in #600
- ♻️ Don't hardcode parser deprecation warning uplevel by @nevans in #602
- ♻️ Simplify
Config::AttrAccessorsa little by @nevans in #606 - ♻️ Set Config[:default] as alias of Config[VERSION] by @nevans in #608
Fixes for unreleased code:
- 🐛 Return ResponseText from
resp-textfallback by @nevans in #605 - 🐛 Fix parse error parser_backtrace (for ruby <= 3.3) by @nevans in #604
Miscellaneous
- Delete test/net/imap/test_data_lite.rb by @nobu in #593
- ⬆️ Bump step-security/harden-runner from 2.14.0 to 2.14.1 by @dependabot[bot] in #596
- Bump step-security/harden-runner from 2.14.1 to 2.14.2 by @dependabot[bot] in #598
Full Changelog: v0.6.2...v0.6.3