Cross-Site Scripting Vulnerability in bootbox

bootbox Updated 02 Oct 2025

Summary

30/05/2019
MODERATE
No i
Moderate
Not published

GHSA-87mg-h5r3-hw88: Cross-Site Scripting in bootbox. Affects bootbox versions < 5.5.2. No fix is published. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

bootbox is an npm package that provides a simple way to create alert, confirm, and prompt dialog boxes using Bootstrap. It is widely used in web applications to display user-friendly messages and gather user input. However, all versions of bootbox are vulnerable to Cross-Site Scripting (XSS) attacks. This means that the package does not properly sanitize user input in the provided dialog boxes, allowing attackers to inject malicious HTML code and execute arbitrary JavaScript.

Vulnerability Detail

The Cross-Site Scripting vulnerability in bootbox arises from the lack of input sanitization. When user input is displayed in the dialog boxes without proper escaping or filtering, it becomes possible for an attacker to inject malicious code. This can lead to various consequences, such as stealing sensitive user information, performing actions on behalf of the user, or defacing the application. The vulnerability has a moderate severity level and is classified under CWE-64 (CWE-79).

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Workaround

A temporary workaround for this vulnerability is to manually sanitize user input before passing it to bootbox. This can be done by using a library or function that performs HTML escaping or filtering. Here's an example using the 'he' library:

const he = require('he');

const sanitizedInput = he.encode(userInput);
bootbox.alert(sanitizedInput);

Conclusion

In conclusion, bootbox is vulnerable to Cross-Site Scripting attacks due to the lack of input sanitization. Developers should take immediate action to sanitize user input and consider using alternative packages with built-in protection against XSS. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for bootbox →

Share this vulnerability

FAQ

bootbox is an npm package that provides a simple way to create alert, confirm, and prompt dialog boxes using Bootstrap.

Cross-Site Scripting is a type of security vulnerability that allows attackers to inject malicious scripts into web pages viewed by other users.

The Cross-Site Scripting vulnerability in bootbox can lead to various consequences, such as stealing sensitive user information, performing actions on behalf of the user, or defacing the application.

To fix the vulnerability, you should sanitize user input before displaying it in the bootbox dialog boxes. Use appropriate HTML escaping or filtering techniques to prevent XSS attacks.

Yes, there are alternative packages available that have built-in protection against XSS attacks. Consider using those packages instead of bootbox.

Related vulnerabilities

Recent vulnerabilities recorded for bootbox.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback