CVE-2011-0739: Mail Mail Improper Input Validation Vulnerability Vulnerability

MODERATE
Advisory Identifier: GHSA-cpjc-p7fc-j9xh
CWE-20
Published
Advisory Summary

CVE-2011-0739 is a MODERATE mail improper input validation vulnerability vulnerability (CWE-20: Improper Input Validation) affecting Mail libraries in the RubyGems ecosystem. The issue involves mail improper input validation vulnerability. Remediation is available by upgrading affected packages to version 2.2.15.

CVE-2011-0739 at a Glance

CVE Identifier CVE-2011-0739
GHSA Identifier GHSA-cpjc-p7fc-j9xh
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-20: Improper Input Validation
Affected Product Mail
Package Ecosystem RubyGems
Published Date
Last Updated

How to Fix CVE-2011-0739

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.2.15
Upgrade mail to 2.2.15
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-2011-0739, 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.2.15), 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-20: Improper Input Validation, where the product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly. 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 deliver function in the sendmail delivery agent (`lib/mail/network/delivery_methods/sendmail.rb`) in Ruby Mail gem 2.2.14 and earlier allows remote attackers to execute arbitrary commands via shell metacharacters in an e-mail address.

CVE-2011-0739 Affected Mail Versions

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

References

Frequently Asked Questions

What is CVE-2011-0739?
CVE-2011-0739 is a security vulnerability in Mail involving Mail Improper Input Validation vulnerability under CWE-20: Improper Input Validation.
Which Mail versions are affected?
Affected versions include releases prior to 2.2.15 across affected packages: mail.
What version fixes CVE-2011-0739?
Upgrading to 2.2.15 (or the latest patched release for your respective branch) resolves the vulnerability.
Is mail affected?
Yes, mail is affected in releases prior to 2.2.15. Upgrade your dependency to 2.2.15 or later.
What CWE is associated with CVE-2011-0739?
CVE-2011-0739 is classified under CWE-20: Improper Input Validation (The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.).
How can I check RubyGems dependencies for CVE-2011-0739?
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-cpjc-p7fc-j9xh",
  "modified" : "2023-01-23T21:15:08Z",
  "published" : "2017-10-24T18:33:38Z",
  "aliases" : [ "CVE-2011-0739" ],
  "summary" : "Mail Improper Input Validation vulnerability",
  "details" : "The deliver function in the sendmail delivery agent (`lib/mail/network/delivery_methods/sendmail.rb`) in Ruby Mail gem 2.2.14 and earlier allows remote attackers to execute arbitrary commands via shell metacharacters in an e-mail address.",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "mail"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.2.15"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2011-0739"
  }, {
    "type" : "WEB",
    "url" : "https://exchange.xforce.ibmcloud.com/vulnerabilities/65010"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/mikel/mail"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/mikel/mail/raw/master/patches/20110126_sendmail.patch"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/mail/CVE-2011-0739.yml"
  }, {
    "type" : "WEB",
    "url" : "https://web.archive.org/web/20200228225346/http://www.securityfocus.com/bid/46021"
  }, {
    "type" : "WEB",
    "url" : "http://groups.google.com/group/mail-ruby/browse_thread/thread/e93bbd05706478dd?pli=1"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-20" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2020-06-16T21:32:10Z",
    "nvd_published_at" : "2011-02-02T01:00:07Z"
  }
}