Every CVE Search/ Get API key

CVE-2012-2140

Mail Gem Improper Input Validation vulnerability

7.5 HighFix available

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.

Exploit likelihood

4.47%Up 2.3 points since Feb 4, 2022
90%50%10%1%

What each source reports

NVD Score used 7.5

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.

Record
CVE-2012-2140
CVSS 2.0
7.5 HighAV:N/AC:L/Au:N/C:P/I:P/A:P
Weakness
CWE-20
Updated
2026-11-02
CVE List No score

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.

Record
CVE-2012-2140
Updated
2026-11-02
EUVDEUVD-2017-0304 No score

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.

Record
EUVD-2017-0304
Updated
2026-11-03
GitHub AdvisoriesGHSA-rp63-jfmw-532w No score

Mail Gem Improper Input Validation vulnerability

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.

Record
GHSA-rp63-jfmw-532w
Weakness
CWE-20
Updated
2026-11-02
OSV No score

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.

Record
CVE-2012-2140
Updated
2026-11-02
OSVDEBIAN-CVE-2012-2140 No score

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.

Record
DEBIAN-CVE-2012-2140
Updated
2026-11-02
OSVGHSA-rp63-jfmw-532w No score

Mail Gem Improper Input Validation vulnerability

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.

Record
GHSA-rp63-jfmw-532w
Weakness
CWE-20
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
mail
RubyGems
before 2.4.3
2.4.3
ruby-mail
Debian:12
before 2.4.4-1
2.4.4-1
ruby-mail
Debian:13
before 2.4.4-1
2.4.4-1
ruby-mail
Debian:14
before 2.4.4-1
2.4.4-1
mail
RubyGems
before 2.4.3, plus listed versions
1.0.01.1.01.2.11.2.51.2.6
Show 45 moreShow less
1.2.81.2.91.3.01.3.11.3.21.3.31.3.41.3.51.4.01.4.11.4.21.4.31.5.01.5.11.5.21.5.31.5.41.6.02.0.32.0.52.1.02.1.12.1.22.1.32.1.52.1.5.12.1.5.22.1.5.32.2.02.2.12.2.102.2.112.2.122.2.132.2.142.2.152.2.162.2.172.2.182.2.192.2.22.2.202.2.32.2.42.2.5
2.4.3

History

History
RecordedChangedSources
aliasesEUVD
first indexedCVE List, GitHub Advisories, NVD, OSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2012-2140 is a high vulnerability (CVSS 7.5) in Rubygems Mail Gem, published July 18, 2012. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 4.47%, the 91st percentile. Fixed in mail 2.4.3.

References

Show 9 moreShow less
This page doesn't list everything

Left out here: 12 versions. The JSON record has them.

MoveEnter Open