CVE-2020-16254 CSS Injection in Chartkick gem
An attacker can inject malicious CSS into Chartkick charts, potentially leading to cross-site scripting attacks in Ruby applications.
- 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-2020-16254?
CVE-2020-16254 is a medium-severity cross-site scripting vulnerability in n/a, published on 5 Aug 2020. 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
The Chartkick gem through 3.3.2 for Ruby allows Cascading Style Sheets (CSS) Injection (without attribute).
Weakness: CWE-74
Which versions are affected by CVE-2020-16254?
2 open source packages ship an affected version, including chartkick. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
chartkick RubyGems | All versions | 3.4.0 |
chartkick RubyGems | All versions | 3.4.0 |
Products include Chartkick Project Chartkick.
How do I fix CVE-2020-16254?
Upgrade chartkick to 3.4.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-2020-16254 being exploited?
There is no known exploitation of CVE-2020-16254 in the wild and no public exploit code.
Other vulnerabilities in n/a
Sources
Also known as GHSA-3j95-fjv2-3m4p.