# CVE-2019-8331: Bootstrap Vulnerable to Cross-Site Scripting

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 6.1
- **CVSS:** 6.1 (v3.1, NVD) `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N`
- **CVSS metrics:** Attack vector: Network; Attack complexity: Low; Privileges required: None; User interaction: Required; Scope: Changed (impact reaches other components); Confidentiality impact: Low; Integrity impact: Low; Availability impact: None
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** Yes (see exploit references)
- **Remote exploitation:** Remote, no login needed
- **EPSS:** 16.40% (percentile 98, 2026-11-26)
- **CWE:** CWE-79
- **Aliases:** GHSA-9v3m-8fp8-mj99
- **Published:** 2019-02-20T16:00:00.000Z
- **Modified:** 2026-09-10T03:47:48.887Z

## Who should check

- Projects that depend on RubyGems package bootstrap (\< 4.3.1)
- Projects that depend on RubyGems package bootstrap-sass (\>= 3.0.0, \< 3.4.1)
- Projects that depend on NuGet package Bootstrap.Less (\>= 3.0.0, \< 3.4.1)
- Projects that depend on NuGet package bootstrap (\>= 4.0.0, \< 4.3.1)
- Projects that depend on NuGet package bootstrap.sass (\< 4.3.1)
- Projects that depend on npm package bootstrap (\>= 4.0.0, \< 4.3.1)
- Projects that depend on npm package bootstrap-sass (\>= 3.0.0, \< 3.4.1)
- Projects that depend on RubyGems package twitter-bootstrap-rails (\< 5.3.0)

## Description

In Bootstrap before 3.4.1 and 4.3.x before 4.3.1, XSS is possible in the tooltip or popover data-template attribute.

## Affected and fixed versions

- RubyGems `bootstrap`: affected \< 4.3.1; fixed 4.3.1 (osv)
- RubyGems `bootstrap-sass`: affected \>= 3.0.0, \< 3.4.1; fixed 3.4.1 (osv)
- NuGet `Bootstrap.Less`: affected \>= 3.0.0, \< 3.4.1; fixed 3.4.1 (osv)
- NuGet `bootstrap`: affected \>= 4.0.0, \< 4.3.1; fixed 4.3.1, 3.4.1 (osv)
- NuGet `bootstrap.sass`: affected \< 4.3.1; fixed 4.3.1 (osv)
- npm `bootstrap`: affected \>= 4.0.0, \< 4.3.1; fixed 4.3.1, 3.4.1 (osv)
- npm `bootstrap-sass`: affected \>= 3.0.0, \< 3.4.1; fixed 3.4.1 (osv)
- RubyGems `twitter-bootstrap-rails`: affected \< 5.3.0; fixed 5.3.0 (osv)
- Maven `org.webjars:bootstrap`: affected \>= 3.0.0, \< 3.4.1; fixed 3.4.1, 4.3.1 (osv)
- Packagist `twbs/bootstrap`: affected \>= 3.0.0, \< 3.4.1; fixed 3.4.1, 4.3.1 (osv)
- n/a: see vendor advisory (nvd)

## Mitigation

- Upgrade bootstrap to 4.3.1 or later.
- Upgrade bootstrap-sass to 3.4.1 or later.
- Upgrade Bootstrap.Less to 3.4.1 or later.
- Upgrade bootstrap to one of 4.3.1, 3.4.1 (or later in the same release line).
- Upgrade bootstrap.sass to 4.3.1 or later.
- Upgrade twitter-bootstrap-rails to 5.3.0 or later.
- Upgrade org.webjars:bootstrap to one of 3.4.1, 4.3.1 (or later in the same release line).
- Upgrade twbs/bootstrap to one of 3.4.1, 4.3.1 (or later in the same release line).

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2019-8331. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2019-8331.md
Affected: bootstrap < 4.3.1; bootstrap-sass >= 3.0.0, < 3.4.1; Bootstrap.Less >= 3.0.0, < 3.4.1; bootstrap >= 4.0.0, < 4.3.1; bootstrap.sass < 4.3.1; bootstrap >= 4.0.0, < 4.3.1; bootstrap-sass >= 3.0.0, < 3.4.1; twitter-bootstrap-rails < 5.3.0; org.webjars:bootstrap >= 3.0.0, < 3.4.1; twbs/bootstrap >= 3.0.…
Fixed in: 4.3.1, 3.4.1, 5.3.0

Steps:
1. Search this machine and project for bootstrap (RubyGems), bootstrap-sass (RubyGems), Bootstrap.Less (NuGet), bootstrap (NuGet), bootstrap.sass (NuGet), bootstrap (npm): dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2019-8331 being exploited?

There is no confirmed exploitation: CVE-2019-8331 is not in the CISA Known Exploited Vulnerabilities catalog. Public exploit code or a proof of concept is available. EPSS estimates a 16.40% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2019-8331?

Medium: CVSS 6.1 (v3.1, scored by NVD). Remote, no login needed. A user has to take an action, such as opening a link, for the attack to work.

### Which versions are affected by CVE-2019-8331?

bootstrap \< 4.3.1; bootstrap-sass \>= 3.0.0, \< 3.4.1; Bootstrap.Less \>= 3.0.0, \< 3.4.1; bootstrap \>= 4.0.0, \< 4.3.1; bootstrap.sass \< 4.3.1; bootstrap \>= 4.0.0, \< 4.3.1; bootstrap-sass \>= 3.0.0, \< 3.4.1; twitter-bootstrap-rails \< 5.3.0; org.webjars:bootstrap \>= 3.0.0, \< 3.4.1; twbs/bootstrap \>= 3.0.0, \< 3.4.1.

### Is there a fix for CVE-2019-8331?

Yes. Fixed in 4.3.1, 3.4.1, 5.3.0. Upgrade bootstrap to 4.3.1 or later. Upgrade bootstrap-sass to 3.4.1 or later. Upgrade Bootstrap.Less to 3.4.1 or later. Upgrade bootstrap to one of 4.3.1, 3.4.1 (or later in the same release line). Upgrade bootstrap.sass to 4.3.1 or later. Upgrade twitter-bootstrap-rails to 5.3.0 or later. Upgrade org.webjars:bootstrap to one of 3.4.1, 4.3.1 (or later in the same release line). Upgrade twbs/bootstrap to one of 3.4.1, 4.3.1 (or later in the same release line).

### How do I check if I'm affected by CVE-2019-8331?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- vendor: <https://access.redhat.com/errata/RHSA-2019:1456>
- vendor: <https://access.redhat.com/errata/RHSA-2019:3023>
- vendor: <https://access.redhat.com/errata/RHSA-2019:3024>
- vendor: <https://blog.getbootstrap.com/2019/02/13/bootstrap-4-3-1-and-3-4-1/>
- vendor: <https://nvd.nist.gov/vuln/detail/CVE-2019-8331>
- vendor: <https://github.com/advisories/GHSA-9v3m-8fp8-mj99>
- patch: <https://github.com/twbs/bootstrap/pull/28236>
- patch: <https://www.tenable.com/security/tns-2021-14>
- exploit: <http://packetstormsecurity.com/files/156743/OctoberCMS-Insecure-Dependencies.html>
- other: <http://www.securityfocus.com/bid/107375>
- other: <https://seclists.org/bugtraq/2019/May/18>
- other: <http://seclists.org/fulldisclosure/2019/May/11>
- other: <http://seclists.org/fulldisclosure/2019/May/10>
- other: <http://seclists.org/fulldisclosure/2019/May/13>
- other: <https://lists.apache.org/thread.html/54df3aeb4239b64b50b356f0ca6f986e3c4ca5b84c515dce077c7854%40%3Cuser.flink.apache.org%3E>
- other: <https://lists.apache.org/thread.html/10f0f3aefd51444d1198c65f44ffdf2d78ca3359423dbc1c168c9731%40%3Cdev.flink.apache.org%3E>
- other: <https://lists.apache.org/thread.html/17ff53f7999e74fbe3cc0ceb4e1c3b00b180b7c5afec8e978837bc49%40%3Cuser.flink.apache.org%3E>
- other: <https://lists.apache.org/thread.html/52bafac05ad174000ea465fe275fd3cc7bd5c25535a7631c0bc9bfb2%40%3Cuser.flink.apache.org%3E>
- other: <https://lists.apache.org/thread.html/52e0e6b5df827ee7f1e68f7cc3babe61af3b2160f5d74a85469b7b0e%40%3Cdev.superset.apache.org%3E>
- other: <https://lists.apache.org/thread.html/b0656d359c7d40ec9f39c8cc61bca66802ef9a2a12ee199f5b0c1442%40%3Cdev.drill.apache.org%3E>
- other: <https://lists.apache.org/thread.html/519eb0fd45642dcecd9ff74cb3e71c20a4753f7d82e2f07864b5108f%40%3Cdev.drill.apache.org%3E>
- other: <https://lists.apache.org/thread.html/f9bc3e55f4e28d1dcd1a69aae6d53e609a758e34d2869b4d798e13cc%40%3Cissues.drill.apache.org%3E>
- other: <https://lists.apache.org/thread.html/r3dc0cac8d856bca02bd6997355d7ff83027dcfc82f8646a29b89b714%40%3Cissues.hbase.apache.org%3E>
- other: <https://lists.apache.org/thread.html/rd0e44e8ef71eeaaa3cf3d1b8b41eb25894372e2995ec908ce7624d26%40%3Ccommits.pulsar.apache.org%3E>
- other: <https://www.oracle.com/security-alerts/cpuApr2021.html>
- other: <https://github.com/twbs/bootstrap/releases/tag/v4.3.1>
- other: <https://github.com/twbs/bootstrap/releases/tag/v3.4.1>
- other: <https://support.f5.com/csp/article/K24383845>
- other: <https://support.f5.com/csp/article/K24383845?utm_source=f5support&amp%3Butm_medium=RSS>
- other: <https://lists.apache.org/thread.html/52e0e6b5df827ee7f1e68f7cc3babe61af3b2160f5d74a85469b7b0e@%3Cdev.superset.apache.org%3E>
- other: <https://lists.apache.org/thread.html/54df3aeb4239b64b50b356f0ca6f986e3c4ca5b84c515dce077c7854@%3Cuser.flink.apache.org%3E>
- other: <https://lists.apache.org/thread.html/b0656d359c7d40ec9f39c8cc61bca66802ef9a2a12ee199f5b0c1442@%3Cdev.drill.apache.org%3E>
- other: <https://lists.apache.org/thread.html/f9bc3e55f4e28d1dcd1a69aae6d53e609a758e34d2869b4d798e13cc@%3Cissues.drill.apache.org%3E>
- other: <https://lists.apache.org/thread.html/r3dc0cac8d856bca02bd6997355d7ff83027dcfc82f8646a29b89b714@%3Cissues.hbase.apache.org%3E>
- other: <https://lists.apache.org/thread.html/rd0e44e8ef71eeaaa3cf3d1b8b41eb25894372e2995ec908ce7624d26@%3Ccommits.pulsar.apache.org%3E>
- other: <https://support.f5.com/csp/article/K24383845?utm_source=f5support&amp;utm_medium=RSS>
- other: <https://web.archive.org/web/20200227083900/http://www.securityfocus.com/bid/107375>
- other: <https://blog.getbootstrap.com/2019/02/13/bootstrap-4-3-1-and-3-4-1>
- other: <https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-8331>
- other: <https://github.com/rubysec/ruby-advisory-db/blob/master/gems/bootstrap/CVE-2019-8331.yml>
- other: <https://github.com/rubysec/ruby-advisory-db/blob/master/gems/twitter-bootstrap-rails/CVE-2019-8331.yml>
- other: <https://github.com/seyhunak/twitter-bootstrap-rails/tree/master/app/assets/javascripts/twitter/bootstrap>
- other: <https://github.com/twbs/bootstrap>
- other: <https://lists.apache.org/thread.html/10f0f3aefd51444d1198c65f44ffdf2d78ca3359423dbc1c168c9731@%3Cdev.flink.apache.org%3E>
- other: <https://lists.apache.org/thread.html/17ff53f7999e74fbe3cc0ceb4e1c3b00b180b7c5afec8e978837bc49@%3Cuser.flink.apache.org%3E>
- other: <https://lists.apache.org/thread.html/519eb0fd45642dcecd9ff74cb3e71c20a4753f7d82e2f07864b5108f@%3Cdev.drill.apache.org%3E>
- other: <https://lists.apache.org/thread.html/52bafac05ad174000ea465fe275fd3cc7bd5c25535a7631c0bc9bfb2@%3Cuser.flink.apache.org%3E>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2019-8331>
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/GHSA-9v3m-8fp8-mj99> (license: <https://creativecommons.org/licenses/by/4.0/>)

HTML: <https://flawdb.com/CVE-2019-8331> · JSON: <https://flawdb.com/api/v1/entries/CVE-2019-8331>
