CVE-2018-14042: Bootstrap XSS in tooltip data-container property

CVE-2018-14042 · Severity: medium · CVSS 6.1 · Published 2018-09-13

Bootstrap, a popular web framework used for designing responsive websites, is vulnerable to a security flaw in its tooltip component. An attacker could potentially execute malicious scripts in a user's browser if the website uses the 'data-container' property of tooltips to display untrusted content. This could lead to unauthorized actions being performed on behalf of the user or the theft of sensitive session information.

Technologies: org.webjars:bootstrap (Maven), bootstrap (npm), bootstrap-sass (npm), bootstrap (NuGet), bootstrap.sass (NuGet), twbs/bootstrap (Packagist), bootstrap (RubyGems), bootstrap-sass (RubyGems). Vendors: Maven, npm, NuGet, Packagist, RubyGems.

Quick answers

Is CVE-2018-14042 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2018-14042 being exploited in the wild.
How severe is CVE-2018-14042?
Medium severity, with a CVSS score of 6.1, published 13 September 2018.
Which products and versions are affected?
org.webjars:bootstrap (Maven) ECOSYSTEM:introduced=4.0.0,fixed=4.1.2; bootstrap (npm) SEMVER:introduced=4.0.0,fixed=4.1.2; bootstrap-sass (npm) SEMVER:introduced=2.0.4,fixed=3.4.0; bootstrap (NuGet) ECOSYSTEM:introduced=4.0.0,fixed=4.1.2; and 4 more.
Is there a fix for CVE-2018-14042?
Yes. org.webjars:bootstrap (Maven): upgrade to 4.1.2 or later; bootstrap (npm): upgrade to 4.1.2 or later; bootstrap-sass (npm): upgrade to 3.4.0 or later; bootstrap (NuGet): upgrade to 4.1.2 or later; bootstrap.sass (NuGet): upgrade to 4.1.2 or later; twbs/bootstrap (Packagist): upgrade to 4.1.2 or later; bootstrap (RubyGems): upgrade to 4.1.2 or later; bootstrap-sass (RubyGems): 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-14042 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2018-14042?
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 4.1.2 or later
    # set org.webjars:bootstrap to 4.1.2 in your pom.xml or build.gradle
  • bootstrap (npm): upgrade to 4.1.2 or later
    npm install bootstrap@4.1.2
  • bootstrap-sass (npm): upgrade to 3.4.0 or later
    npm install bootstrap-sass@3.4.0
  • bootstrap (NuGet): upgrade to 4.1.2 or later
    dotnet add package bootstrap --version 4.1.2
  • bootstrap.sass (NuGet): upgrade to 4.1.2 or later
    dotnet add package bootstrap.sass --version 4.1.2
  • twbs/bootstrap (Packagist): upgrade to 4.1.2 or later
    composer require twbs/bootstrap:^4.1.2
  • bootstrap (RubyGems): upgrade to 4.1.2 or later
    bundle update bootstrap
  • bootstrap-sass (RubyGems): upgrade to 3.4.0 or later
    bundle update bootstrap-sass

Technical details

A cross-site scripting (XSS) vulnerability exists in Bootstrap's tooltip component due to improper neutralization of input in the 'data-container' property. An attacker can exploit this by injecting malicious scripts into the property, which are then executed in the context of the victim's browser when the tooltip is rendered. This is a network-reachable attack that requires user interaction (typically viewing a page with the malicious tooltip). The vulnerability affects Bootstrap versions 2.3.0 through 3.3.7 and 4.0.0 through 4.1.1. It has been patched in versions 3.4.0 and 4.1.2.

Affected products

  • Bootstrap bootstrap >= 2.3.0, < 3.4.0
  • Bootstrap bootstrap >= 4.0.0, < 4.1.2
  • Bootstrap bootstrap-sass >= 2.0.4, < 3.4.0
  • Bootstrap bootstrap.sass >= 4.0.0, < 4.1.2

Identifiers

  • CVE-2018-14042
  • GHSA-7mvr-5x2g-wfc8

Timeline

  • 2018-07-12: patched: Bootstrap 4.1.2 released
  • 2018-07-13: disclosed: NVD publication date
  • 2018-09-13: advisory: GitHub Advisory published

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.