GHSA-87mg-h5r3-hw88: Bootbox Cross-Site Scripting Vulnerability

MODERATE
CWE-64 CWE-79
Published
Advisory Summary

GHSA-87mg-h5r3-hw88 is a MODERATE cross-site scripting vulnerability (CWE-64: Windows Shortcut Following (.LNK)) affecting Bootbox libraries in the npm ecosystem. The issue involves cross-site scripting in bootbox. Remediation is available in the latest vendor maintenance releases.

GHSA-87mg-h5r3-hw88 at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-87mg-h5r3-hw88
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-64: Windows Shortcut Following (.LNK)
Affected Product Bootbox
Package Ecosystem npm
Published Date
Last Updated

How to Fix GHSA-87mg-h5r3-hw88

To remediate this vulnerability, upgrade all affected Bootbox dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

bootbox fixed: Latest secure release
npm install bootbox@Latest secure release
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls bootbox

How to Check if You Are Affected

To determine whether your Node.js application is affected by GHSA-87mg-h5r3-hw88, inspect your project dependencies using npm:

npm ls bootbox

Analyze the terminal output to locate any version of Bootbox in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than the patched release), your application is affected.

Note: The npm ls bootbox command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-64: Windows Shortcut Following (.LNK), where the product, when opening a file or directory, does not sufficiently handle when the file is a windows shortcut (.lnk) whose target is outside of the intended control sphere. this could allow an attacker to cause the product to operate on unauthorized files. In Bootbox, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

All version of `bootbox` are vulnerable to Cross-Site Scripting. The package does not sanitize user input in the provided dialog boxes, allowing attackers to inject HTML code and execute arbitrary JavaScript. ## Recommendation Sanitize user input being passed to `bootbox` or consider using an alternative package.

GHSA-87mg-h5r3-hw88 Affected Bootbox Versions

1 component(s)
Product / Package Ecosystem Affected Versions Fixed Version
bootbox
npm
≤ 5.5.2

References

Frequently Asked Questions

What is GHSA-87mg-h5r3-hw88?
GHSA-87mg-h5r3-hw88 is a security vulnerability in Bootbox involving Cross-Site Scripting in bootbox under CWE-64: Windows Shortcut Following (.LNK).
Which Bootbox versions are affected?
Affected versions include releases prior to current release patches across affected packages: bootbox.
What version fixes GHSA-87mg-h5r3-hw88?
Upgrading to current release patches (or the latest patched release for your respective branch) resolves the vulnerability.
Is bootbox affected?
Yes, bootbox is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What CWE is associated with GHSA-87mg-h5r3-hw88?
GHSA-87mg-h5r3-hw88 is classified under CWE-64: Windows Shortcut Following (.LNK) (The product, when opening a file or directory, does not sufficiently handle when the file is a Windows shortcut (.LNK) whose target is outside of the intended control sphere. This could allow an attacker to cause the product to operate on unauthorized files.).
How can I check npm dependencies for GHSA-87mg-h5r3-hw88?
Run the dependency tree command: 'npm ls bootbox'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-87mg-h5r3-hw88",
  "modified" : "2021-09-16T21:01:13Z",
  "published" : "2019-05-30T17:23:28Z",
  "aliases" : [ ],
  "summary" : "Cross-Site Scripting in bootbox",
  "details" : "All version of `bootbox` are vulnerable to Cross-Site Scripting. The package does not sanitize user input in the provided dialog boxes, allowing attackers to inject HTML code and execute arbitrary JavaScript.\n\n\n## Recommendation\n\nSanitize user input being passed to `bootbox` or consider using an alternative package.",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "bootbox"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "5.5.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/makeusabrew/bootbox/issues/661"
  }, {
    "type" : "WEB",
    "url" : "https://hackerone.com/reports/508446"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/makeusabrew/bootbox"
  }, {
    "type" : "WEB",
    "url" : "https://www.npmjs.com/advisories/882"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-64", "CWE-79" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2019-05-30T17:22:56Z",
    "nvd_published_at" : null
  }
}