CVE-2018-14041
Description
In Bootstrap before 4.1.2, XSS is possible in the data-target property of scrollspy.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
Cross-site scripting (XSS) vulnerability in Bootstrap's scrollspy component before 4.1.2 via the data-target property.
Vulnerability
Bootstrap versions before 4.1.2 are susceptible to a cross-site scripting (XSS) vulnerability in the scrollspy component. The bug resides in the handling of the data-target attribute, which can be manipulated to inject arbitrary JavaScript. [1]
Exploitation
An attacker can exploit this by providing a crafted data-target value that includes malicious script code. The vulnerability does not require authentication; it can be triggered via user interaction such as visiting a page that uses the vulnerable scrollspy behavior. [1]
Impact
Successful exploitation allows an attacker to execute arbitrary JavaScript in the context of the victim's browser, leading to potential session hijacking, defacement, or theft of sensitive data. [1]
Mitigation
The issue is fixed in Bootstrap version 4.1.2. Users should upgrade to this version or later. No other workarounds are mentioned. [1][4]
AI Insight generated on May 22, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
bootstrapnpm | >= 4.0.0, < 4.1.2 | 4.1.2 |
typo3/cms-corePackagist | >= 8.0.0, < 8.7.23 | 8.7.23 |
typo3/cms-corePackagist | >= 9.0.0, < 9.5.4 | 9.5.4 |
typo3/cmsPackagist | >= 8.0.0, < 8.7.23 | 8.7.23 |
typo3/cmsPackagist | >= 9.0.0, < 9.5.4 | 9.5.4 |
bootstrapRubyGems | >= 4.0.0, < 4.1.2 | 4.1.2 |
twbs/bootstrapPackagist | >= 4.0.0, < 4.1.2 | 4.1.2 |
bootstrapNuGet | >= 4.0.0, < 4.1.2 | 4.1.2 |
bootstrap.sassNuGet | >= 4.0.0, < 4.1.2 | 4.1.2 |
org.webjars:bootstrapMaven | >= 4.0.0, < 4.1.2 | 4.1.2 |
Affected products
8- ghsa-coords8 versionspkg:composer/twbs/bootstrappkg:composer/typo3/cmspkg:composer/typo3/cms-corepkg:gem/bootstrappkg:maven/org.webjars/bootstrappkg:npm/bootstrappkg:nuget/bootstrappkg:nuget/bootstrap.sass
>= 4.0.0, < 4.1.2+ 7 more
- (no CPE)range: >= 4.0.0, < 4.1.2
- (no CPE)range: >= 8.0.0, < 8.7.23
- (no CPE)range: >= 8.0.0, < 8.7.23
- (no CPE)range: >= 4.0.0, < 4.1.2
- (no CPE)range: >= 4.0.0, < 4.1.2
- (no CPE)range: >= 4.0.0, < 4.1.2
- (no CPE)range: >= 4.0.0, < 4.1.2
- (no CPE)range: >= 4.0.0, < 4.1.2
Patches
21 file changed · +1 −1
README.md+1 −1 modified@@ -49,7 +49,7 @@ Several quick start options are available: - Install with [Composer](https://getcomposer.org/): `composer require twbs/bootstrap:4.1.2` - Install with [NuGet](https://www.nuget.org/): CSS: `Install-Package bootstrap` Sass: `Install-Package bootstrap.sass` -Read the [Getting started page](https://getbootstrap.com/docs/4.0/getting-started/introduction/) for information on the framework contents, templates and examples, and more. +Read the [Getting started page](https://getbootstrap.com/docs/4.1/getting-started/introduction/) for information on the framework contents, templates and examples, and more. ## Status
cc61edfa8af7fix(scrollspy): xss in target option
1 file changed · +1 −1
js/src/scrollspy.js+1 −1 modified@@ -115,7 +115,7 @@ const ScrollSpy = (($) => { this._scrollHeight = this._getScrollHeight() - const targets = $.makeArray($(this._selector)) + const targets = $.makeArray(document.querySelectorAll(this._selector)) targets .map((element) => {
Vulnerability mechanics
Generated on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
29- access.redhat.com/errata/RHSA-2019:1456ghsavendor-advisoryx_refsource_REDHATWEB
- github.com/advisories/GHSA-pj7m-g53m-7638ghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2018-14041ghsaADVISORY
- packetstormsecurity.com/files/152787/dotCMS-5.1.1-Vulnerable-Dependencies.htmlghsax_refsource_MISCWEB
- packetstormsecurity.com/files/156743/OctoberCMS-Insecure-Dependencies.htmlghsax_refsource_MISCWEB
- seclists.org/fulldisclosure/2019/May/10ghsamailing-listx_refsource_FULLDISCWEB
- seclists.org/fulldisclosure/2019/May/11ghsamailing-listx_refsource_FULLDISCWEB
- seclists.org/fulldisclosure/2019/May/13ghsamailing-listx_refsource_FULLDISCWEB
- blog.getbootstrap.com/2018/07/12/bootstrap-4-1-2ghsaWEB
- blog.getbootstrap.com/2018/07/12/bootstrap-4-1-2/mitrex_refsource_MISC
- github.com/FriendsOfPHP/security-advisories/blob/master/typo3/cms-core/CVE-2018-14041.yamlghsaWEB
- github.com/FriendsOfPHP/security-advisories/blob/master/typo3/cms/CVE-2018-14041.yamlghsaWEB
- github.com/rubysec/ruby-advisory-db/blob/master/gems/bootstrap/CVE-2018-14041.ymlghsaWEB
- github.com/twbs/bootstrap/issues/26423ghsax_refsource_MISCWEB
- github.com/twbs/bootstrap/issues/26627ghsax_refsource_MISCWEB
- github.com/twbs/bootstrap/pull/26630ghsax_refsource_MISCWEB
- lists.apache.org/thread.html/519eb0fd45642dcecd9ff74cb3e71c20a4753f7d82e2f07864b5108f%40%3Cdev.drill.apache.org%3Emitremailing-listx_refsource_MLIST
- lists.apache.org/thread.html/519eb0fd45642dcecd9ff74cb3e71c20a4753f7d82e2f07864b5108f@%3Cdev.drill.apache.org%3EghsaWEB
- lists.apache.org/thread.html/52e0e6b5df827ee7f1e68f7cc3babe61af3b2160f5d74a85469b7b0e%40%3Cdev.superset.apache.org%3Emitremailing-listx_refsource_MLIST
- lists.apache.org/thread.html/52e0e6b5df827ee7f1e68f7cc3babe61af3b2160f5d74a85469b7b0e@%3Cdev.superset.apache.org%3EghsaWEB
- lists.apache.org/thread.html/b0656d359c7d40ec9f39c8cc61bca66802ef9a2a12ee199f5b0c1442%40%3Cdev.drill.apache.org%3Emitremailing-listx_refsource_MLIST
- lists.apache.org/thread.html/b0656d359c7d40ec9f39c8cc61bca66802ef9a2a12ee199f5b0c1442@%3Cdev.drill.apache.org%3EghsaWEB
- lists.apache.org/thread.html/f9bc3e55f4e28d1dcd1a69aae6d53e609a758e34d2869b4d798e13cc%40%3Cissues.drill.apache.org%3Emitremailing-listx_refsource_MLIST
- lists.apache.org/thread.html/f9bc3e55f4e28d1dcd1a69aae6d53e609a758e34d2869b4d798e13cc@%3Cissues.drill.apache.org%3EghsaWEB
- lists.apache.org/thread.html/r3dc0cac8d856bca02bd6997355d7ff83027dcfc82f8646a29b89b714%40%3Cissues.hbase.apache.org%3Emitremailing-listx_refsource_MLIST
- lists.apache.org/thread.html/r3dc0cac8d856bca02bd6997355d7ff83027dcfc82f8646a29b89b714@%3Cissues.hbase.apache.org%3EghsaWEB
- seclists.org/bugtraq/2019/May/18ghsamailing-listx_refsource_BUGTRAQWEB
- typo3.org/security/advisory/typo3-core-sa-2019-006ghsaWEB
- www.oracle.com/security-alerts/cpuApr2021.htmlghsax_refsource_MISCWEB
News mentions
0No linked articles in our index yet.