CVE-2017-1002201: XSS
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.
Other sources
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.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
rubygems/hamlto a version that resolves this vulnerability.Fixed in 5.0.0 - Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 5.0.0.beta.2 - Compensating control
Escape user input characters <, >, ", and ' when using it to perform tasks on the server.
Event History
Frequently Asked Questions
Which Haml releases are affected?
Haml versions before 5.0.0.beta.2 are affected. The issue concerns Haml's handling of single quotes in user-controlled input used in server-side tasks.
What does an attacker need to exploit this issue?
An attacker needs a way to supply input that is incorporated into vulnerable Haml-generated output. Exploitation also requires a user to interact with the resulting crafted content, as indicated by the UI:R vector.
What is the practical impact?
A crafted single quote can introduce additional attributes into generated markup and may enable code execution in the affected user's browser. The reported impact includes low confidentiality and integrity impact, with no availability impact.