Skip to content

[CVE-2026-41316] Bump erb to 4.0.4.1 - #456

Merged
Jan-Kazlouski-elastic merged 1 commit into
mainfrom
jan-kazlouski/12737-cve-2026-41316-fix
Jul 23, 2026
Merged

[CVE-2026-41316] Bump erb to 4.0.4.1#456
Jan-Kazlouski-elastic merged 1 commit into
mainfrom
jan-kazlouski/12737-cve-2026-41316-fix

Conversation

@Jan-Kazlouski-elastic

Copy link
Copy Markdown
Contributor

Part of https://github.com/elastic/security/issues/12737

Resolves CVE-2026-41316 (high) — @_init deserialization guard bypass in ERB via def_module / def_method / def_class. Fixed in ERB 4.0.4.1.

Changes

  • Gemfile / Gemfile.lock: pin erb to 4.0.4.1 (overrides JRuby 9.4's default erb 2.2.3).
  • NOTICE.txt: regenerated for the new dependency (and transitive cgi).

Testing

  • Lint: no offenses.
  • Full test suite: 690 examples, 16 pending; one flaky locking spec unrelated to erb (passes on retry).
  • Confirmed runtime ERB version is 4.0.4.1.

Scanner A/B (CVE-2026-41316)

Tool Before After
Trivy reported clear
Snyk reported clear

Checklists

Pre-Review Checklist

  • 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)
  • This PR has a meaningful title
  • This PR links to all relevant GitHub issues that it fixes or partially addresses
  • this PR has a thorough description
  • Covered the changes with automated tests
  • Tested the changes locally
  • 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
  • Ran make notice if any dependencies have been added

Changes Requiring Extra Attention

  • Security-related changes (encryption, TLS, SSRF, etc)

Release Note

Bump ERB to 4.0.4.1 to resolve CVE-2026-41316 (deserialization guard bypass).

Made with Cursor

Override JRuby 9.4's default erb 2.2.3; patched @_init guard covers
def_module/def_method/def_class deserialization bypass.

Part of elastic/security#12737

Co-authored-by: Cursor <cursoragent@cursor.com>
@Jan-Kazlouski-elastic
Jan-Kazlouski-elastic merged commit d6a5ec9 into main Jul 23, 2026
6 checks passed
@Jan-Kazlouski-elastic
Jan-Kazlouski-elastic deleted the jan-kazlouski/12737-cve-2026-41316-fix branch July 23, 2026 19:33
@github-actions

Copy link
Copy Markdown

💚 Backport PR(s) successfully created

Status Branch Result
1.0 #458

This backport PR will be merged automatically after passing CI.

Jan-Kazlouski-elastic added a commit that referenced this pull request Jul 23, 2026
Backports the following commits to 1.0:
 - [CVE-2026-41316] Bump erb to 4.0.4.1 (#456)

Co-authored-by: Jan-Kazlouski-elastic <jan.kazlouski@elastic.co>
Co-authored-by: Cursor <cursoragent@cursor.com>
Jan-Kazlouski-elastic added a commit that referenced this pull request Jul 24, 2026
Resolve NOTICE.txt conflict by regenerating it (make notice) on top of
the merged Gemfile.lock, which now includes both erb 4.0.4.1 (#456) and
net-imap 0.3.10.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants