Vulnerabilities in pkg:gem/haml
PACKAGECVE-2017-1002201 is a MODERATE (CVSS 6.1) cross-site scripting vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Haml libraries in the RubyGems ecosystem. The issue involves haml vulnerable to cross-site scripting. Remediation is available by upgrading affected packages to version 5.0.0.
pkg:gem/haml
Vulnerability advisories affecting package pkg:gem/haml. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-r53w-g4xm-3gc6 | CVE-2017-1002201 | MODERATE | Haml vulnerable to cross-site scripting |
CVE-2017-1002201 at a Glance
Security Impact
CVSS: 6.1
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N).
How to Fix CVE-2017-1002201
To remediate this vulnerability, upgrade all affected Haml dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade haml to 5.0.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for haml
How to Check if You Are Affected
To determine whether your application is affected by CVE-2017-1002201, inspect your project dependencies for Haml:
inspect dependencies for haml
Analyze the terminal output to locate any version of Haml in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 5.0.0), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'), where the product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. In Haml, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2017-1002201 Affected Haml Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
haml
|
RubyGems |
< 5.0.0
|
5.0.0
|
References
Frequently Asked Questions
What is CVE-2017-1002201?
Which Haml versions are affected?
What version fixes CVE-2017-1002201?
Is haml affected?
What is the CVSS score of CVE-2017-1002201?
What CWE is associated with CVE-2017-1002201?
How can I check RubyGems dependencies for CVE-2017-1002201?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-r53w-g4xm-3gc6",
"modified" : "2023-08-25T21:32:06Z",
"published" : "2019-10-21T21:59:13Z",
"aliases" : [ "CVE-2017-1002201" ],
"summary" : "Haml vulnerable to cross-site scripting",
"details" : "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.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "RubyGems",
"name" : "haml"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "5.0.0"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2017-1002201"
}, {
"type" : "WEB",
"url" : "https://github.com/haml/haml/commit/18576ae6e9bdcb4303fdbe6b3199869d289d67c2"
}, {
"type" : "WEB",
"url" : "https://github.com/haml/haml"
}, {
"type" : "WEB",
"url" : "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/haml/CVE-2017-1002201.yml"
}, {
"type" : "WEB",
"url" : "https://lists.debian.org/debian-lts-announce/2019/11/msg00007.html"
}, {
"type" : "WEB",
"url" : "https://lists.debian.org/debian-lts-announce/2021/12/msg00028.html"
}, {
"type" : "WEB",
"url" : "https://security.gentoo.org/glsa/202007-27"
}, {
"type" : "WEB",
"url" : "https://snyk.io/vuln/SNYK-RUBY-HAML-20362"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-79" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2019-10-16T15:18:02Z",
"nvd_published_at" : "2019-10-15T18:15:00Z"
}
}