Cross-Site Scripting Vulnerability in @hapi/boom

@hapi/boom Updated 02 Oct 2025

Summary

04/09/2020
MODERATE
Yes i
Moderate
6.5

GHSA-2ggq-vfcp-gwhj: Cross-Site Scripting in @hapi/boom. Affects @hapi/boom versions < 0.3.8. Fixed in 0.3.8. 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 Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

Background

The @hapi/boom package is a part of the npm ecosystem and is used for handling HTTP errors in Node.js applications. It provides a set of utility methods for creating and formatting error responses. However, versions prior to 0.3.8 are vulnerable to Cross-Site Scripting (XSS) attacks. This vulnerability arises from the package's failure to properly escape error messages, which can allow attackers to execute arbitrary JavaScript code in a victim's browser.

Vulnerability Detail

The Cross-Site Scripting vulnerability in @hapi/boom allows attackers to inject malicious code into error messages, which are then rendered on the victim's browser. This can lead to various consequences, including unauthorized access to sensitive information, session hijacking, defacement of web pages, and the potential for further exploitation. The vulnerability is rated as MODERATE severity with a CVSS score of 6.5. The Common Weakness Enumeration (CWE) ID associated with this vulnerability is CWE-79.

How To Fix

Minimum fixed version

0.3.8

This is the first release that contains the fix.

npm install @hapi/boom@0.3.8

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

There is no known workaround for this vulnerability. It is crucial to upgrade to the fixed version of the package to ensure the security of your application.

Conclusion

The Cross-Site Scripting vulnerability in the @hapi/boom package can have serious security implications for your Node.js application. It is crucial to upgrade to version 0.3.8 or later to mitigate this vulnerability. Failure to address this issue may expose your application and its users to potential attacks. If you need further assistance or support in resolving this vulnerability, please contact DevNack.com.

See every vulnerability recorded for @hapi/boom →

Share this vulnerability

FAQ

Cross-Site Scripting (XSS) is a type of security vulnerability that allows attackers to inject malicious scripts into web pages viewed by other users. This can lead to the execution of arbitrary code, theft of sensitive information, and other malicious activities.

If your application uses the vulnerable versions of the @hapi/boom package, it is susceptible to Cross-Site Scripting attacks. Attackers can exploit this vulnerability to execute arbitrary JavaScript code in the browsers of your application's users, potentially compromising their data and the integrity of your application.

While there is no specific known exploit for this vulnerability in the public domain, it is important to address it promptly to prevent potential attacks. Attackers are constantly evolving their techniques, and unpatched vulnerabilities are often targeted.

This vulnerability specifically affects the @hapi/boom package. However, it is always recommended to keep all dependencies up to date to mitigate potential security risks.

You can find more information about this vulnerability, including the technical details and the fix, in the GitHub Advisory Database: https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2020/09/GHSA-2ggq-vfcp-gwhj/GHSA-2ggq-vfcp-gwhj.json

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

How To Fix

Minimum fixed version

0.3.8

This is the first release that contains the fix.

npm install @hapi/boom@0.3.8

Tip — Not sure which version your app runs? Vulert can match this fix to it. 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