CVE-2012-2140Rubygems Mail Gem
High 7.5 No auth needed
Follow: this CVE · Rubygems · Rubygems Mail Gem We alert you by email or Slack (account required).
- Priority
- 60
- CVSS 2.0
- 7.5
- EPSS
- 4.4% probability of exploitation in 30 days · percentile 92
- Auth required
- No
- Published
- Jul 18, 2012
- Updated
- Jun 16, 2026
- Category
- Application · Cross-platform
- Weakness (CWE)
- CWE-20
- Vector
AV:N/AC:L/Au:N/C:P/I:P/A:P
What happens
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.
What to do
- Apply the vendor's security update for Mail Gem.
- It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How to upgrade |
|---|---|---|---|---|
| RubyGems | mail |
< 2.4.3 |
2.4.3 |
gem "mail", ">= 2.4.3" |
Per OSV / GitHub Advisories (GHSA-rp63-jfmw-532w). Check the version in your lockfile before upgrading.
Affected products (CPE)
| Vendor | Product | Versions |
|---|---|---|
| rubygems | mail_gem | ≤ 2.4.1 |
| rubygems | mail_gem | 2.3.2 |
| rubygems | mail_gem | 2.3.3 |
Official sources
References
Links published by the sources. Open them with care.
- lists.fedoraproject.org
- lists.fedoraproject.org
- lists.fedoraproject.org
- secunia.com Vendor Advisory
- www.openwall.com
- www.openwall.com
- bugzilla.novell.com
- bugzilla.redhat.com
- github.com
- github.com Exploit Patch
- github.com Exploit Patch