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

Source: https://junglewise.ai/threats/cve-2018-14042-bootstrap-xss-in-tooltip-data-container-property  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2018-09-13. Updated: 2026-06-09  
License: CC BY 4.0 with a link back

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)](https://junglewise.ai/threats/technologies/org-webjars-bootstrap), [bootstrap (npm)](https://junglewise.ai/threats/technologies/bootstrap), [bootstrap-sass (npm)](https://junglewise.ai/threats/technologies/bootstrap-sass), [bootstrap (NuGet)](https://junglewise.ai/threats/technologies/nuget-bootstrap), [bootstrap.sass (NuGet)](https://junglewise.ai/threats/technologies/nuget-bootstrap-sass), [twbs/bootstrap (Packagist)](https://junglewise.ai/threats/technologies/twbs-bootstrap), [bootstrap (RubyGems)](https://junglewise.ai/threats/technologies/rubygems-bootstrap), [bootstrap-sass (RubyGems)](https://junglewise.ai/threats/technologies/rubygems-bootstrap-sass). Vendors: [Maven](https://junglewise.ai/threats/vendors/maven), [npm](https://junglewise.ai/threats/vendors/npm), [NuGet](https://junglewise.ai/threats/vendors/nuget), [Packagist](https://junglewise.ai/threats/vendors/packagist), [RubyGems](https://junglewise.ai/threats/vendors/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

  ```sh
  # set org.webjars:bootstrap to 4.1.2 in your pom.xml or build.gradle
  ```

- bootstrap (npm): upgrade to 4.1.2 or later

  ```sh
  npm install bootstrap@4.1.2
  ```

- bootstrap-sass (npm): upgrade to 3.4.0 or later

  ```sh
  npm install bootstrap-sass@3.4.0
  ```

- bootstrap (NuGet): upgrade to 4.1.2 or later

  ```sh
  dotnet add package bootstrap --version 4.1.2
  ```

- bootstrap.sass (NuGet): upgrade to 4.1.2 or later

  ```sh
  dotnet add package bootstrap.sass --version 4.1.2
  ```

- twbs/bootstrap (Packagist): upgrade to 4.1.2 or later

  ```sh
  composer require twbs/bootstrap:^4.1.2
  ```

- bootstrap (RubyGems): upgrade to 4.1.2 or later

  ```sh
  bundle update bootstrap
  ```

- bootstrap-sass (RubyGems): upgrade to 3.4.0 or later

  ```sh
  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

- [https://api.github.com/users/tdunlap607](https://api.github.com/users/tdunlap607)
- [https://github.com/tdunlap607](https://github.com/tdunlap607)
- [https://api.github.com/users/tdunlap607/gists%7B/gist_id%7D](https://api.github.com/users/tdunlap607/gists%7B/gist_id%7D)
- [https://api.github.com/users/tdunlap607/repos](https://api.github.com/users/tdunlap607/repos)
- [https://avatars.githubusercontent.com/u/16122665?v=4](https://avatars.githubusercontent.com/u/16122665?v=4)
- [https://api.github.com/users/tdunlap607/events%7B/privacy%7D](https://api.github.com/users/tdunlap607/events%7B/privacy%7D)

## Related threats

- [Bootstrap Vulnerable to Cross-Site Scripting in its Popover and Tooltip Components](https://junglewise.ai/threats/cve-2025-1647-bootstrap-cross-site-scripting-in-popover-and-tooltip)
- [Bootstrap XSS vulnerability in carousel component](https://junglewise.ai/threats/cve-2024-6531-bootstrap-xss-vulnerability-in-carousel-component)
- [Bootstrap XSS vulnerability in carousel component (withdrawn)](https://junglewise.ai/threats/cve-2024-6484-bootstrap-xss-vulnerability-in-carousel-component-withdrawn)
- [Bootstrap Cross-Site Scripting in data-* attributes](https://junglewise.ai/threats/cve-2024-6485-bootstrap-cross-site-scripting-in-data-attributes)
- [Bootstrap-sass contains code execution backdoor](https://junglewise.ai/threats/cve-2019-10842-bootstrap-sass-contains-code-execution-backdoor)
