Skip to content

[1.0] [CVE-2026-42246] Pin net-imap 0.3.10 (#457) - #459

Merged
Jan-Kazlouski-elastic merged 1 commit into
1.0from
backport/1.0/pr-457
Jul 27, 2026
Merged

[1.0] [CVE-2026-42246] Pin net-imap 0.3.10 (#457)#459
Jan-Kazlouski-elastic merged 1 commit into
1.0from
backport/1.0/pr-457

Conversation

@github-actions

Copy link
Copy Markdown

Backports the following commits to 1.0:

### 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).
@github-actions
github-actions Bot requested a review from a team as a code owner July 24, 2026 18:54
@github-actions github-actions Bot mentioned this pull request Jul 24, 2026
11 tasks
@Jan-Kazlouski-elastic
Jan-Kazlouski-elastic enabled auto-merge (squash) July 27, 2026 06:43
@Jan-Kazlouski-elastic
Jan-Kazlouski-elastic merged commit 0dba9b6 into 1.0 Jul 27, 2026
2 checks passed
@Jan-Kazlouski-elastic
Jan-Kazlouski-elastic deleted the backport/1.0/pr-457 branch July 27, 2026 06:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant