CVE-2018-7212 Sinatra Path Traversal vulnerability
Attackers can bypass path traversal protections on Windows using backslashes to access unauthorized files in Sinatra applications.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2018-7212?
CVE-2018-7212 is a medium-severity path traversal vulnerability in n/a, published on 18 Feb 2018. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
An issue was discovered in rack-protection/lib/rack/protection/path_traversal.rb in Sinatra 2.x before 2.0.1 on Windows. Path traversal is possible via backslash characters.
Weakness: CWE-22
Which versions are affected by CVE-2018-7212?
2 open source packages ship an affected version, including sinatra. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
sinatra RubyGems | From 2.0.0.beta1 | 2.0.1 |
sinatra RubyGems | From 2.0.0.beta1 | 2.0.1 |
Products include Sinatrarb Sinatra.
How do I fix CVE-2018-7212?
Upgrade sinatra to 2.0.1 or later.
Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.
Is CVE-2018-7212 being exploited?
There is no known exploitation of CVE-2018-7212 in the wild and no public exploit code.
Other vulnerabilities in n/a
Sources
Also known as GHSA-h29f-7f56-j8wh.