[1.0] [CVE-2026-42246] Pin net-imap 0.3.10 (#457) - #459
Merged
Conversation
### Part of elastic/security#12735 Resolves **CVE-2026-42246** (high) — STARTTLS stripping / response injection in `Net::IMAP#starttls`. Fixed in net-imap **0.3.10**. JRuby 9.4.12.0 ships vulnerable net-imap in two places: the default gem **0.2.3** and an older stdlib copy **0.1.1** (`net/imap.rb`). The crawler does not use IMAP; this change removes both from the images and pins the fixed gem so scanners and runtime use 0.3.10. #### Changes - **`Gemfile` / `Gemfile.lock`**: pin `net-imap` `0.3.10` (lowest fixed release) so Bundler installs over the JRuby default gem. - **`Dockerfile` / `Dockerfile.wolfi`**: remove the default `net-imap` 0.2.3 gem artifacts **and** the older stdlib `net/imap.rb` (0.1.1) from `/opt/jruby`. - **`NOTICE.txt`**: regenerated for the new gems (`make notice`); added a `date` license-file fallback. #### Testing - Full test suite (JRuby 9.4.12.0 image): **690 examples, 0 failures, 16 pending**. - Confirmed runtime net-imap version is `0.3.10` (`vendor/bundle/.../net-imap-0.3.10`). - Confirmed the post-cleanup image has no remaining `*imap*` files under `/opt/jruby`, and the app still loads 0.3.10 via `bundler/setup`. ### Scanner A/B (`CVE-2026-42246`) | Tool | Before | After | |------|--------|-------| | Trivy | reported | clear | | Snyk | reported (SNYK-RUBY-NETIMAP-16420230) | clear | ### Checklists #### Pre-Review Checklist - [x] This PR does NOT contain credentials of any kind, such as API keys or username/passwords (double check `crawler.yml.example` and `elasticsearch.yml.example`) - [x] This PR has a meaningful title - [x] This PR links to all relevant GitHub issues that it fixes or partially addresses - [x] this PR has a thorough description - [ ] Covered the changes with automated tests - [x] Tested the changes locally - [x] Added a label for each target release version (example: `v0.1.0`) - [ ] Considered corresponding documentation changes - [ ] Contributed any configuration settings changes to the configuration reference - [x] Ran `make notice` if any dependencies have been added #### Changes Requiring Extra Attention - [x] Security-related changes (encryption, TLS, SSRF, etc) ### Release Note Pin net-imap to 0.3.10 to resolve CVE-2026-42246 (STARTTLS stripping in Net::IMAP).
Jan-Kazlouski-elastic
approved these changes
Jul 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backports the following commits to 1.0: