Quick answers
- Is CVE-2018-20676 exploited in the wild?
- No. Junglewise Threat Intelligence has no report of CVE-2018-20676 being exploited in the wild.
- How severe is CVE-2018-20676?
- Low severity, with a CVSS score of 3, published 17 January 2019.
- Which products and versions are affected?
- org.webjars:bootstrap (Maven) ECOSYSTEM:introduced=0,fixed=3.4.0; bootstrap (npm) SEMVER:introduced=0,fixed=3.4.0; bootstrap-sass (npm) SEMVER:introduced=0,fixed=3.4.0; twbs/bootstrap (Packagist) ECOSYSTEM:introduced=0,fixed=3.4.0.
- Is there a fix for CVE-2018-20676?
- Yes. org.webjars:bootstrap (Maven): upgrade to 3.4.0 or later; bootstrap (npm): upgrade to 3.4.0 or later; bootstrap-sass (npm): upgrade to 3.4.0 or later; twbs/bootstrap (Packagist): upgrade to 3.4.0 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
- How is CVE-2018-20676 attacked?
- It is attacked over the network, in a software library.
- Am I affected by CVE-2018-20676?
- Check whether you run org.webjars:bootstrap (Maven), bootstrap (npm), bootstrap-sass (npm) or one of the others listed 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
- org.webjars:bootstrap (Maven): upgrade to 3.4.0 or later
# set org.webjars:bootstrap to 3.4.0 in your pom.xml or build.gradle - bootstrap (npm): upgrade to 3.4.0 or later
npm install bootstrap@3.4.0 - bootstrap-sass (npm): upgrade to 3.4.0 or later
npm install bootstrap-sass@3.4.0 - twbs/bootstrap (Packagist): upgrade to 3.4.0 or later
composer require twbs/bootstrap:^3.4.0
Technical details
A Cross-Site Scripting (XSS) vulnerability exists in Bootstrap versions prior to 3.4.0. The flaw is located in the tooltip component's handling of the 'data-viewport' attribute, which fails to properly sanitize input before rendering it in the DOM. An attacker can exploit this by injecting a malicious script into the attribute (e.g., via an <img> tag with an 'onerror' handler). Execution occurs when a user interacts with the affected element, such as hovering over a link that triggers the tooltip. This is a client-side vulnerability requiring user interaction. The issue was resolved in version 3.4.0 by implementing proper input neutralization.
Affected products
- twbs bootstrap < 3.4.0
- twbs bootstrap-sass < 3.4.0
Identifiers
- CVE-2018-20676
- GHSA-3mgp-fx93-9xv5
Timeline
- 2018-08-10: disclosed: Issue reported on GitHub repository
- 2018-12-13: patched: Bootstrap 3.4.0 released with fix
- 2019-01-17: advisory: GitHub advisory published
References
- https://github.com/twbs/bootstrap/issues/27915
- https://github.com/twbs/bootstrap/issues/27915
- https://github.com/twbs/bootstrap/issues/27044
- https://github.com/twbs/bootstrap/pull/27047
- https://github.com/twbs/bootstrap/commit/2a5ba23ce8f041f3548317acc992ed8a736b609d
- https://lists.apache.org/thread.html/rd0e44e8ef71eeaaa3cf3d1b8b41eb25894372e2995ec908ce7624d26@%3Ccommits.pulsar.apache.org%3E