Skip to content
Fencer Intel
high 7.5

CVE-2012-2140 json

Mail Gem Improper Input Validation vulnerability

published 2012-07-18 14 y ago modified 2026-06-16 4 mo ago also GHSA-rp63-jfmw-532w , EUVD-2017-0304

cvss
7.5
version 2.0, NVD
cisa kev
Not listed
not in CISA's catalog
epss
4.5%
EPSS 4.5% chance of exploitation in 30 days, percentile 91%
public exploits
0
none known

Summary

The Mail gem before 2.4.3 for Ruby allows remote attackers to execute arbitrary commands via shell metacharacters in a (1) sendmail or (2) exim delivery.

Patch / fix

  • rubygems mail 2.4.3
  • ruby-mail Debian 14, Debian 13, Debian 12 2.4.4-1

debian advisories DEBIAN-CVE-2012-2140

Vendor advisories

What the vendors themselves say about their products: affected, fixed or not affected, and what to do.

red hat product security vex CVE-2012-2140 updated cvss 7.5

rubygem-mail: arbitrary command execution when using exim or sendmail from commandline

  • Red Hat Subscription Asset Manager rubygem-mail
    affected: no fix available
  • Red Hat CloudForms Cloud Engine for RHEL 6 Server puppet 2.6.17-2.el6cf, rubygem-mail 2.3.0-3.el6cf, puppet-server 2.6.17-2.el6cf, rubygem-compass 0.11.5-2.el6cf, rubygem-net-ldap 0.1.1-3.el6cf, rubygem-chunky_png 1.2.0-3.el6cf, +6 more Red Hat CloudForms System Engine for RHEL 6 Server puppet 2.6.17-2.el6cf, rubygem-mail 2.3.0-3.el6cf, puppet-server 2.6.17-2.el6cf, rubygem-compass 0.11.5-2.el6cf, rubygem-net-ldap 0.1.1-3.el6cf, rubygem-chunky_png 1.2.0-3.el6cf, +6 more
    fixed: vendor fix RHSA-2012:1542

Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf

Exploit prediction

4.47% chance of exploitation in the next 30 days, higher than 91% of all scored CVEs (FIRST EPSS, 2026-11-09).

Exploits and checks

  • github.com https://github.com/mikel/mail/commit/ac56f03bdfc30b379aeecd4ff317d08fdaa328c2 referenced PoC, tagged "exploit" by a source, unverified
  • github.com https://github.com/mikel/mail/commit/39b590ddb08f90ddbe445837359a2c8843e533d0 referenced PoC, tagged "exploit" by a source, unverified

CVSS scores

assigned by version score vector
NVD 2.0 7.5 AV:N/AC:L/Au:N/C:P/I:P/A:P

Affected packages

ecosystem package affected fixed in
rubygems mail
<2.4.3
2.4.3

Classification

Weakness
  • CWE-20 Improper Input Validation

References

Sources

Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.