Quick answers
- Is CVE-2019-18841 exploited in the wild?
- No. Junglewise Threat Intelligence has no report of CVE-2019-18841 being exploited in the wild.
- How severe is CVE-2019-18841?
- Low severity, with a CVSS score of 3.1, published 2 December 2019.
- Which products and versions are affected?
- chartkick (RubyGems) ECOSYSTEM:introduced=0,fixed=3.3.0.
- Is there a fix for CVE-2019-18841?
- Yes. chartkick (RubyGems): upgrade to 3.3.0 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
- How is CVE-2019-18841 attacked?
- It is attacked over the network, in a software library.
- Am I affected by CVE-2019-18841?
- Check whether you run chartkick (RubyGems) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.
How to fix
- chartkick (RubyGems): upgrade to 3.3.0 or later
bundle update chartkick
Technical details
Chartkick.js fails to properly sanitize chart options before processing them, allowing prototype pollution attacks through the __proto__ property. An attacker can pass malicious JSON containing __proto__ keys either directly as chart options or via a crafted response from a data URL endpoint. The vulnerability affects all Object instances created after pollution, as they inherit the polluted prototype properties. The attack requires either the ability to control chart options passed to the library or to serve a malicious response at a URL that Chartkick loads data from. The fix in version 3.2.0 and later prevents this by filtering or rejecting prototype pollution attempts during chart initialization.
Affected products
- ankane chartkick 3.1.0 through 3.1.3 (npm); 0 through 3.2.x (RubyGems, fixed in 3.3.0)
Identifiers
- CVE-2019-18841
- GHSA-5pm8-492c-92p5
Timeline
- 2019-11-10: disclosed: Vulnerability reported as issue #117 on GitHub
- 2019-12-02: advisory: GHSA-5pm8-492c-92p5 published
- 2019-11-09: patched: Fix released in version 3.2.0 (npm) and 3.3.0 (RubyGems)
References
- https://github.com/ankane/chartkick.js/issues/117
- https://github.com/ankane/chartkick/commit/b810936bbf687bc74c5b6dba72d2397a399885fa
- https://chartkick.com/
- https://github.com/ankane/chartkick/blob/master/CHANGELOG.md
- https://github.com/ankane/chartkick/commits/master
- https://github.com/rubysec/ruby-advisory-db/blob/master/gems/chartkick/CVE-2019-18841.yml