CSS Injection Affecting chartkick package, versions <3.4.0
Threat Intelligence
EPSS
0.08% (34th
percentile)
Do your applications use this vulnerable package?
In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.
Test your applications- Snyk ID SNYK-RUBY-CHARTKICK-597471
- published 6 Aug 2020
- disclosed 6 Aug 2020
- credit Unknown
Introduced: 6 Aug 2020
CVE-2020-16254 Open this link in a new tabHow to fix?
Upgrade chartkick
to version 3.4.0 or higher.
Overview
chartkick is a Ruby gem that allows creation of JavaScript charts.
Affected versions of this package are vulnerable to CSS Injection. Chartkick is vulnerable to CSS injection if user input is passed to the width or height option.
<%= line_chart data, width: params[:width], height: params[:height] %>
An attacker can set additional CSS properties, like:
<%= line_chart data, width: "100%; background-image: url('http://example.com/image.png')" %>
References
CVSS Scores
version 3.1