Loading...
Skip to main content

CVE-2019-8331 — Vulnerability in bootstrap — CVE Details

MEDIUM

Bootstrap Vulnerable to Cross-Site Scripting

Published February 22, 2019Updated September 10, 2026Source: osv

Summary

Versions of `bootstrap` prior to 3.4.1 for 3.x and 4.3.1 for 4.x are vulnerable to Cross-Site Scripting (XSS). The `data-template` attribute of the tooltip and popover plugins lacks input sanitization and may allow attacker to execute arbitrary JavaScript. ## Recommendation For `bootstrap` 4.x upgrade to 4.3.1 or later. For `bootstrap` 3.x upgrade to 3.4.1 or later.

Advisory Timeline

  • First published February 22, 2019 (2789 days ago).
  • Last revised September 10, 2026 — 2756 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

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

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

Affected Packages (14)

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

PackageEcosystemAffectedFixed In
bootstrap
npm
All versions3.4.1
twitter-bootstrap-rails
rubygems
0.0.3, 0.0.4, 0.0.5, 1.3.0 (+42 more)5.3.0
bootstrap
nuget
4.0.0, 4.1.0, 4.1.1, 4.1.1-contentFiles (+3 more)4.3.1
bootstrap.sass
nuget
3.4.1, 4.0.0, 4.0.0-alpha, 4.0.0-alpha2 (+13 more)4.3.1
twbs/bootstrap
packagist
v4.0.0, v4.1.0, v4.1.1, v4.1.2 (+4 more)4.3.1
org.webjars:bootstrap
maven
3.0.0, 3.0.1, 3.0.2, 3.0.3 (+18 more)3.4.1
bootstrap
nuget
3.0.0, 3.0.1, 3.0.2, 3.0.3 (+13 more)3.4.1
bootstrap
npm
All versions4.3.1
Bootstrap.Less
nuget
3.3.5, 3.3.6, 3.3.6-jQuery3, 3.3.6.1 (+2 more)3.4.1
bootstrap-sass
rubygems
3.0.0.0, 3.0.1.0, 3.0.1.0.rc, 3.0.2.0 (+20 more)3.4.1
bootstrap
rubygems
4.0.0, 4.0.0.alpha1, 4.0.0.alpha2, 4.0.0.alpha3 (+14 more)4.3.1
org.webjars:bootstrap
maven
4.0.0, 4.0.0-1, 4.0.0-2, 4.1.0 (+5 more)4.3.1
bootstrap-sass
npm
All versions3.4.1
twbs/bootstrap
packagist
v3.0.0, v3.0.1, v3.0.2, v3.0.3 (+11 more)3.4.1

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.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N

References

Frequently Asked Questions

What is CVE-2019-8331?
Bootstrap Vulnerable to Cross-Site Scripting 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-2019-8331?
CVE-2019-8331 affects bootstrap, twitter-bootstrap-rails and bootstrap.sass (and 4 more). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2019-8331 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-9v3m-8fp8-mj99

Related CVEs

Check if you're affected

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

Scan Your Dependencies