Loading...
Skip to main content

CVE-2018-14040 — Vulnerability in bootstrap — CVE Details

MEDIUM

Bootstrap vulnerable to Cross-Site Scripting (XSS)

Published May 13, 2022Updated September 10, 2026Source: osv

Summary

In Bootstrap starting in version 2.3.0 and prior to 3.4.0, as well as 4.x before 4.1.2, XSS is possible in the collapse data-parent attribute.

Advisory Timeline

  • First published May 13, 2022 (1613 days ago).
  • Last revised September 10, 2026 — 1581 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

Bundler
Update bootstrap to 4.1.2 or later
gem install bootstrap -v 4.1.2
Bundler
Update bootstrap-sass to 3.4.0 or later
gem install bootstrap-sass -v 3.4.0
Composer
Update twbs/bootstrap to 4.1.2 or later
composer require "twbs/bootstrap:^4.1.2"
npm
Update bootstrap to 4.1.2 or later
npm install bootstrap@4.1.2
NuGet
Update bootstrap to 3.4.0 or later
dotnet add package bootstrap --version 3.4.0
Composer
Update twbs/bootstrap to 3.4.0 or later
composer require "twbs/bootstrap:^3.4.0"
Bundler
Update bootstrap to 3.4.0 or later
gem install bootstrap -v 3.4.0
Maven
Update org.webjars:bootstrap to 4.1.2 or later
<!-- Update pom.xml dependency version to 4.1.2 for org.webjars:bootstrap -->
NuGet
Update bootstrap.sass to 4.1.2 or later
dotnet add package bootstrap.sass --version 4.1.2
NuGet
Update bootstrap to 4.1.2 or later
dotnet add package bootstrap --version 4.1.2
npm
Update bootstrap to 3.4.0 or later
npm install bootstrap@3.4.0
Maven
Update org.webjars:bootstrap to 3.4.0 or later
<!-- Update pom.xml dependency version to 3.4.0 for org.webjars:bootstrap -->

After upgrading, run your dependency scanner again to confirm the vulnerability is resolved.

Affected Packages (12)

Affects 5 ecosystems: nuget (2), rubygems (2), maven (1), npm (1), packagist (1).

PackageEcosystemAffectedFixed In
bootstrap
rubygems
4.0.0, 4.1.0, 4.1.14.1.2
bootstrap-sass
rubygems
2.3.0.0, 2.3.0.1, 2.3.1.0, 2.3.1.2 (+29 more)3.4.0
twbs/bootstrap
packagist
v4.0.0, v4.1.0, v4.1.14.1.2
bootstrap
npm
All versions4.1.2
bootstrap
nuget
2.3.1, 2.3.2, 3.0.0, 3.0.1 (+14 more)3.4.0
twbs/bootstrap
packagist
v2.3.0, v2.3.1, v2.3.2, v3.0.0 (+15 more)3.4.0
bootstrap
rubygems
All versions3.4.0
org.webjars:bootstrap
maven
4.0.0, 4.0.0-1, 4.0.0-2, 4.1.0 (+1 more)4.1.2
bootstrap.sass
nuget
4.0.0, 4.1.0, 4.1.1, 4.1.1-contentFiles4.1.2
bootstrap
nuget
4.0.0, 4.1.0, 4.1.1, 4.1.1-contentFiles4.1.2
bootstrap
npm
All versions3.4.0
org.webjars:bootstrap
maven
2.3.0, 2.3.1, 2.3.1-1, 2.3.2 (+23 more)3.4.0

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

  • CWE-79
    Cross-site Scripting (XSS)MITRE

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 6.1 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Changed
Confidentiality
Low
Integrity
Low
Availability
None

CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N

References

Frequently Asked Questions

What is CVE-2018-14040?
Bootstrap vulnerable to Cross-Site Scripting (XSS) This vulnerability has been assigned a severity rating of MEDIUM (CVSS score: 6.1/10).
How do I check if my project is affected by CVE-2018-14040?
CVE-2018-14040 affects bootstrap, bootstrap-sass and twbs/bootstrap (and 2 more). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2018-14040 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
6.1

Exploitation requires specific conditions or has limited impact. Remediate within weeks.

Also Known As

GHSA-3wqf-4x89-9g79

Related CVEs

Check if you're affected

Scan your dependencies to see if this vulnerability affects your projects.

Scan Your Dependencies