CVE-2012-2139 Mail Gem Path Traversal vulnerability

Medium 5.0 Published Updated

Remote attackers can read arbitrary files via directory traversal in the Mail gem's file delivery method.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2012-2139?

CVE-2012-2139 is a medium-severity path traversal vulnerability in n/a, published on 18 Jul 2012. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

Directory traversal vulnerability in lib/mail/network/delivery_methods/file_delivery.rb in the Mail gem before 2.4.4 for Ruby allows remote attackers to read arbitrary files via a .. (dot dot) in the to parameter.

Weakness: CWE-22

Which versions are affected by CVE-2012-2139?

2 open source packages ship an affected version, including mail. It affects 1 product.

PackageAffectedFixed in
mail RubyGemsAll versions2.4.4
mail RubyGemsAll versions2.4.4

Products include Rubygems Mail Gem.

How do I fix CVE-2012-2139?

Upgrade mail to 2.4.4 or later.

Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.

Is CVE-2012-2139 being exploited?

There is no known exploitation of CVE-2012-2139 in the wild and no public exploit code.

Sources

Also known as DEBIAN-CVE-2012-2139, GHSA-cj92-c4fj-w9c5.

Is CVE-2012-2139 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free