CVE-2017-1002201 Haml vulnerable to cross-site scripting

Medium 6.1 Published Updated

An attacker can inject malicious scripts via unescaped single quotes in user input, potentially executing code on the server.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2017-1002201?

CVE-2017-1002201 is a medium-severity cross-site scripting vulnerability in Debian Debian Linux, published on 15 Oct 2019. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

Official description

In haml versions prior to version 5.0.0.beta.2, when using user input to perform tasks on the server, characters like < > " ' must be escaped properly. In this case, the ' character was missed. An attacker can manipulate the input to introduce additional attributes, potentially executing code.

Weakness: CWE-79

Which versions are affected by CVE-2017-1002201?

2 open source packages ship an affected version, including haml. It affects 2 products.

PackageAffectedFixed in
haml RubyGemsAll versions5.0.0
haml RubyGemsAll versions5.0.0
Linux distribution packages (3)
rubygem-haml SUSE:OpenStack Cloud 7All versions4.0.6-3.3.1
rubygem-haml SUSE:OpenStack Cloud Crowbar 8All versions4.0.6-3.3.1
rubygem-haml SUSE:OpenStack Cloud Crowbar 9All versions4.0.6-3.3.1

Products include Debian Debian Linux, Haml Haml.

How do I fix CVE-2017-1002201?

Upgrade haml to 5.0.0 or later.

Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.

Is CVE-2017-1002201 being exploited?

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

All Debian Debian Linux vulnerabilities

Sources

Also known as DEBIAN-CVE-2017-1002201, DLA-1986-1, DLA-2864-1, GHSA-r53w-g4xm-3gc6, SNYK-RUBY-HAML-20362, SUSE-SU-2019:2932-1 and 1 more.

Is CVE-2017-1002201 in your software?

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

Check your SBOMs for free