MediumGHSA-q86f-fmqf-qrf6CVE-2015-9097

Mail Gem CRLF Injection vulnerability

Published 24 Oct 2017 · Updated 16 Feb 2024

Is your project on an affected mail?

Private repo? Upload its lockfile instead, or connect GitHub to check every repo.

Look after several Rails or Ruby apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie

Affected package

mailRubyGems
Affected
<2.5.5
Fixed in
2.5.5
Update to the fixed version for your release line, for example:bundle update --conservative mail # Gemfile: '>= 2.5.5'

Details

The mail gem before 2.5.5 for Ruby (aka A Really Ruby Mail Library) is vulnerable to SMTP command injection via CRLF sequences in a RCPT TO or MAIL FROM command, as demonstrated by CRLF sequences immediately before and after a DATA substring.

Is GHSA-q86f-fmqf-qrf6 in any of your client repos?

Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected mail, and gives you the command that fixes it.

More advisories for mail

  • MediumCVE-2026-63435Mail: Email address spoofing via malformed RFC 2047 encoded-words · 2 Sept 2026
  • HighCVE-2012-2140Mail Gem Improper Input Validation vulnerability · 24 Oct 2017
  • MediumCVE-2012-2139Mail Gem Path Traversal vulnerability · 24 Oct 2017
  • MediumCVE-2011-0739Mail Improper Input Validation vulnerability · 24 Oct 2017
mail security overview

References

Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.