CVE-2015-9097: Mail Mail Gem CRLF Injection Vulnerability Vulnerability

MODERATE
Advisory Identifier: GHSA-q86f-fmqf-qrf6
CVSS 6.1
CWE-93
Published
Advisory Summary

CVE-2015-9097 is a MODERATE (CVSS 6.1) mail gem crlf injection vulnerability vulnerability (CWE-93: Improper Neutralization of CRLF Sequences ('CRLF Injection')) affecting Mail libraries in the RubyGems ecosystem. The issue involves mail gem crlf injection vulnerability. Remediation is available by upgrading affected packages to version 2.5.5.

CVE-2015-9097 at a Glance

CVE Identifier CVE-2015-9097
GHSA Identifier GHSA-q86f-fmqf-qrf6
Severity MODERATE
CVSS v3.1 Base Score 6.1
CWE Classification CWE-93: Improper Neutralization of CRLF Sequences ('CRLF Injection')
Affected Product Mail
Package Ecosystem RubyGems
Published Date
Last Updated

Security Impact

CVSS: 6.1

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction Required (UI:R)
Scope Changed (S:C)
Confidentiality Low (C:L)
Integrity Low (I:L)
Availability None (A:N)

How to Fix CVE-2015-9097

To remediate this vulnerability, upgrade all affected Mail dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

mail fixed: 2.5.5
Upgrade mail to 2.5.5
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for mail

How to Check if You Are Affected

To determine whether your application is affected by CVE-2015-9097, inspect your project dependencies for Mail:

inspect dependencies for mail

Analyze the terminal output to locate any version of Mail in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.5.5), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-93: Improper Neutralization of CRLF Sequences ('CRLF Injection'), where the product uses crlf (carriage return line feeds) as a special element, e.g. to separate lines or records, but it does not neutralize or incorrectly neutralizes crlf sequences from inputs. In Mail, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

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.

CVE-2015-9097 Affected Mail Versions

1 component(s)
Fixed Versions:
2.5.5
Product / Package Ecosystem Affected Versions Fixed Version
mail
RubyGems
< 2.5.5
2.5.5

References

Frequently Asked Questions

What is CVE-2015-9097?
CVE-2015-9097 is a security vulnerability in Mail involving Mail Gem CRLF Injection vulnerability under CWE-93: Improper Neutralization of CRLF Sequences ('CRLF Injection').
Which Mail versions are affected?
Affected versions include releases prior to 2.5.5 across affected packages: mail.
What version fixes CVE-2015-9097?
Upgrading to 2.5.5 (or the latest patched release for your respective branch) resolves the vulnerability.
Is mail affected?
Yes, mail is affected in releases prior to 2.5.5. Upgrade your dependency to 2.5.5 or later.
What is the CVSS score of CVE-2015-9097?
CVE-2015-9097 has a CVSS v3.1 base score of 6.1 (MODERATE) with vector string CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N.
What CWE is associated with CVE-2015-9097?
CVE-2015-9097 is classified under CWE-93: Improper Neutralization of CRLF Sequences ('CRLF Injection') (The product uses CRLF (carriage return line feeds) as a special element, e.g. to separate lines or records, but it does not neutralize or incorrectly neutralizes CRLF sequences from inputs.).
How can I check RubyGems dependencies for CVE-2015-9097?
Run the dependency tree command: 'inspect dependencies for mail'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-q86f-fmqf-qrf6",
  "modified" : "2023-09-05T21:08:32Z",
  "published" : "2017-10-24T18:33:36Z",
  "aliases" : [ "CVE-2015-9097" ],
  "summary" : "Mail Gem CRLF Injection vulnerability",
  "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.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "mail"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.5.5"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2015-9097"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rubysec/ruby-advisory-db/issues/215"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/mikel/mail/pull/1097"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/mikel/mail/commit/72befdc4dab3e6e288ce226a7da2aa474cf5be83"
  }, {
    "type" : "WEB",
    "url" : "https://hackerone.com/reports/137631"
  }, {
    "type" : "ADVISORY",
    "url" : "https://github.com/advisories/GHSA-q86f-fmqf-qrf6"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/mikel/mail"
  }, {
    "type" : "WEB",
    "url" : "https://rubysec.com/advisories/mail-OSVDB-131677"
  }, {
    "type" : "WEB",
    "url" : "http://openwall.com/lists/oss-security/2015/12/11/3"
  }, {
    "type" : "WEB",
    "url" : "http://www.mbsd.jp/Whitepaper/smtpi.pdf"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-93" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2020-06-16T21:51:27Z",
    "nvd_published_at" : null
  }
}