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
- github.com/mikel/mail@ac56f03 commit
- github.com/mikel/mail@39b590d commit
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-mailaffected: 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 morefixed: 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 | <2.4.3 |
2.4.3 |
Classification
- Weakness
-
- CWE-20 Improper Input Validation
References
-
github.com
/mikel/mail/commit/ac56f03bdfc30b379aeecd4ff317d08fdaa328c2
web, exploit, patch
-
github.com
/mikel/mail/commit/39b590ddb08f90ddbe445837359a2c8843e533d0
web, exploit, patch
-
lists.fedoraproject.org
/pipermail/package-announce/2012-May/080648.html
vendor-advisory, web
-
lists.fedoraproject.org
/pipermail/package-announce/2012-May/080645.html
vendor-advisory, web
-
lists.fedoraproject.org
/pipermail/package-announce/2012-May/080747.html
vendor-advisory, web
-
secunia.com
/advisories/48970
third-party-advisory, vendor-advisory
-
bugzilla.redhat.com
/show_bug.cgi?id=816352
web
-
openwall.com
/lists/oss-security/2012/04/25/8
mailing-list, web
-
bugzilla.novell.com
/show_bug.cgi?id=759092
web
-
github.com
/mikel/mail/blob/9beb079c70d236a5ad2e1ba95b2c977e55deb7af/CHANGELOG.rdoc
web
-
openwall.com
/lists/oss-security/2012/04/26/1
mailing-list, web
-
nvd.nist.gov
/vuln/detail/CVE-2012-2140
advisory
-
github.com
/mikel/mail
package
Sources
- CVE List CVE-2012-2140
- GitHub Advisory GHSA-rp63-jfmw-532w
- NVD CVE-2012-2140
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.