Rubysec

Providing security resources for the Ruby community.
Follow us @rubysec or email us via info at rubysec.com

Advisory Archive

Back

---
gem: mail
date: 2015-12-09
url: https://hackerone.com/reports/137631
cve: 2015-9097
title: SMTP command injection
description: |
  Because Mail does not disallow CRLF in email addresses, an attacker can
  inject SMTP commands in specially crafted email addresses passed to
  RCPT TO and MAIL FROM.

  Not affected by this vulnerability:
    * Ruby 2.4.0+ with a fix for CVE-2015-9096.
    * Applications that do not use SMTP delivery.
    * Applications that validate email addresses to not include CRLF.

  The injection attack is described in Terada, Takeshi. "SMTP Injection via
  Recipient Email Addresses." 2015. The attacks described in the paper
  (Terada, p. 4) can be applied to the library without any modification.
patched_versions:
- ">= 2.5.5"
related:
  url: '["http://www.mbsd.jp/Whitepaper/smtpi.pdf", "https://github.com/mikel/mail/pull/1097"]'