CVE-2013-0162 ruby_parser allows local users to overwrite arbitrary files via symlink attack on temporary file with predictable name

Low 2.1 Published Updated

Local attackers can overwrite arbitrary files via symlink attacks on predictable temporary files in the ruby_parser gem.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Local or same network only
Victim action needed
Not needed
Fix
Available

What is CVE-2013-0162?

CVE-2013-0162 is a low-severity path traversal vulnerability in n/a, published on 1 Mar 2013. It can only be exploited from the same machine or local network, with no action from the victim.

Official description

The diff_pp function in lib/gauntlet_rubyparser.rb in the ruby_parser gem 3.1.1 and earlier for Ruby allows local users to overwrite arbitrary files via a symlink attack on a temporary file with a predictable name in /tmp.

Weakness: CWE-264

Which versions are affected by CVE-2013-0162?

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

PackageAffectedFixed in
ruby_parser RubyGemsFrom 2.0.23.1.2
ruby_parser RubyGemsFrom 2.0.23.1.2

Products include Ryan Davis Ruby Parser.

How do I fix CVE-2013-0162?

Upgrade ruby_parser to 3.1.2 or later.

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

Is CVE-2013-0162 being exploited?

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

Sources

Also known as GHSA-8mvw-22r7-w6fq, UBUNTU-CVE-2013-0162.

Is CVE-2013-0162 in your software?

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

Check your SBOMs for free