CVE-2020-16254 CSS Injection in Chartkick gem

Medium 6.1 Published Updated

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.

PackageAffectedFixed in
chartkick RubyGemsAll versions3.4.0
chartkick RubyGemsAll versions3.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.

Sources

Also known as GHSA-3j95-fjv2-3m4p.

Is CVE-2020-16254 in your software?

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

Check your SBOMs for free