NIST deprecates RSA-2048 from 2030. Find every one of them before attackers do.
💎 RubyGems
Not in CISA KEV

CVE-2012-2140 — mail

Fix: mikel/mail@39b590d

CVE-2012-2140 is a Improper Input Validation vulnerability in mail. 2 public exploit or proof-of-concept references are indexed, so weaponization risk is real. A fix is available for mail — see the affected versions and patch details below.

Mail Gem Improper Input Validation vulnerability

Also known asGHSA-rp63-jfmw-532w
Published
Updated
Affected
1 pkg
Patched
1 / 1
Exploits
2 known
Exploitation data as of Nov 22, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

EPSS Exploitation Probability

via FIRST.org ↗
4.4%probability of exploitation in next 30 days
Lower Risk-0.05%
Lower risk than most CVEs92th percentile — riskier than 92% of all scored CVEsHighest risk
3.17%3.77%4.37%4.97%3.7%4.4%May 26Sep 26Nov 26

Probability of exploitation in the next 30 days, from FIRST.org EPSS.

Real-World Exposure

1 pkg affected
💎mail

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects RubyGems packages — download data is not available via public APIs for these ecosystems.

Description

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.

Affected Packages

1 total 1 fixed
EcosystemPackageVulnerable rangeFix
💎RubyGemsmailall versions2.4.3bundle update mail --conservative

Affected Products

1 product · 3 configurations
Application
mail gemrubygems
≤ 2.4.1
2 versions
2.3.22.3.3
Exploits & PoCs
2

Research use only. For defensive security, authorized penetration testing, and academic research only. Never execute exploit code against systems without explicit written authorization.

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for mail, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update mail to 2.4.3 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2012-2140 is resolved across your whole dependency graph.

  3. Workarounds

    If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.

Fixing This On Your OS

If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.

Red HatImportant
ProductFixed inAdvisory
CloudForms for RHEL 6converge-ui-devel-0:1.0.4-1.el6cfRHSA-2012:1542

Frequently Asked Questions

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.
O3 Security · Impact-Aware SCA

Is CVE-2012-2140 in your dependencies?

Find it across RubyGems, including transitive dependencies.

CVE-2012-2140: mail — Fixed in 2.4.3