Skip to content

🚨 [security] Update mail 2.7.0 → 2.9.1 (minor) - #402

Open
depfu[bot] wants to merge 1 commit into
masterfrom
depfu/update/mail-2.9.1
Open

🚨 [security] Update mail 2.7.0 → 2.9.1 (minor)#402
depfu[bot] wants to merge 1 commit into
masterfrom
depfu/update/mail-2.9.1

Conversation

@depfu

@depfu depfu Bot commented Sep 3, 2026

Copy link
Copy Markdown

🚨 Your current dependencies have known security vulnerabilities 🚨

This dependency update fixes known security vulnerabilities. Please see the details below and assess their impact carefully. We recommend to merge and deploy this as soon as possible!


Here is everything you need to know about this update. Please take a good look at what changed and the test results before merging this pull request.

What changed?

↗️ mail (indirect, 2.7.0 → 2.9.1) · Repo · Changelog

Security Advisories 🚨

🚨 Mail: Email address spoofing via malformed RFC 2047 encoded-words

Summary

Mail::Utilities.q_value_decode and Mail::Utilities.b_value_decode decoded only the first RFC 2047 encoded-word in a string and used an overly greedy pattern to match the charset token. A crafted, malformed encoded-word embedded in an address display name or local part could cause the decoded output to differ from what a human reviewer or downstream parser would expect, allowing an attacker to spoof the apparent sender/recipient address.

Details

Both decoders used a single String#match against a pattern such as /=?(.+)??[Qq]?(.*)?=/m. Two problems:

  1. Single match, dropped remainder. Only the first =?charset?Q?...?= (or ?B?) word was decoded. Any additional encoded-words or surrounding text were not handled consistently, so the decoded result could silently omit or alter parts of the input.
  2. Greedy charset capture. (.+)? is greedy and matches across ? delimiters, so a malformed word could span more of the string than a strict RFC 2047 parse would, changing the boundary between "encoded" and "literal" text.

Impact

Applications using mail to parse and display or authorize based on decoded header values (From, To, Reply-To, etc.) may present or act on an address different from the one a validator inspecting the raw header would see. Primary risk is spoofing / phishing and authorization-check bypass. No RCE.

Release Notes

2.9.1

What's Changed

  • Add Ruby 3.4 to CI matrix in GitHub Actions workflow by @ydah in #1653

  • Improve decoding of Q- and B-encoded strings by @radar in #1664

  • Bump to 2.9.1 by @radar in #1665

  • @ydah made their first contribution in #1653

Full Changelog: 2.9.0...2.9.1

2.9.0

What's Changed

New Contributors

Full Changelog: 2.8.1...2.9.0

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

↗️ mini_mime (indirect, 1.0.1 → 1.1.5) · Repo · Changelog

Commits

See the full diff on Github. The new version differs by 43 commits:

🆕 date (added, 3.5.1)

🆕 logger (added, 1.7.0)

🆕 mini_portile2 (added, 2.8.9)

🆕 net-imap (added, 0.6.6)

🆕 net-pop (added, 0.1.2)

🆕 net-protocol (added, 0.3.0)

🆕 net-smtp (added, 0.5.1)

🆕 timeout (added, 0.6.1)


Depfu Status

Depfu will automatically keep this PR conflict-free, as long as you don't add any commits to this branch yourself. You can also trigger a rebase manually by commenting with @depfu rebase.

All Depfu comment commands
@​depfu rebase
Rebases against your default branch and redoes this update
@​depfu recreate
Recreates this PR, overwriting any edits that you've made to it
@​depfu merge
Merges this PR once your tests are passing and conflicts are resolved
@​depfu cancel merge
Cancels automatic merging of this PR
@​depfu close
Closes this PR and deletes the branch
@​depfu reopen
Restores the branch and reopens this PR (if it's closed)
@​depfu pause
Ignores all future updates for this dependency and closes this PR
@​depfu pause [minor|major]
Ignores all future minor/major updates for this dependency and closes this PR
@​depfu resume
Future versions of this dependency will create PRs again (leaves this PR as is)

@depfu depfu Bot added the depfu label Sep 3, 2026
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.

0 participants