Denial of Service in @hapi/hapi

@hapi/hapi Updated 02 Oct 2025

Summary

03/09/2020
HIGH
Yes i
High
Not published

GHSA-23vw-mhv5-grv5: Denial of Service in @hapi/hapi. Affects @hapi/hapi across 2 version ranges.

< 18.4.1 >= 19.0.0, < 19.1.1

Fixed in 18.4.1 or 19.1.1, depending on the release line you run. 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 Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

The @hapi/hapi package is a popular Node.js framework for building web applications. It provides a robust set of features and utilities to simplify the development process. However, versions prior to 18.4.1 or 19.1.1 are vulnerable to a Denial of Service (DoS) attack. This vulnerability specifically affects the CORS request handler, which is responsible for handling Cross-Origin Resource Sharing requests. If the header of a request contains certain invalid values, the function in charge of processing the request will throw a system error. In the absence of an unhandled exception handler, the application will terminate, allowing an attacker to disrupt the services provided by the application.

Vulnerability Detail

The vulnerability in @hapi/hapi allows an attacker to trigger a DoS attack by sending requests with specific invalid values in the header. When the CORS request handler encounters these invalid values, it throws a system error, causing the application to exit. This can lead to a complete shutdown of the affected services, rendering them unavailable to legitimate users. The impact of this vulnerability can range from temporary service disruptions to prolonged downtime, depending on the availability of an unhandled exception handler. It is important to note that this vulnerability only affects versions prior to 18.4.1 or 19.1.1 of the @hapi/hapi package.

How To Fix

Fixed versions by release line

The minimum fixed version depends on the release line you run.

  • < 18.4.1 18.4.1
    npm install @hapi/hapi@18.4.1
  • >= 19.0.0, < 19.1.1 19.1.1
    npm install @hapi/hapi@19.1.1

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Workaround

There is no known workaround for this vulnerability. The only effective solution is to upgrade to a patched version of the @hapi/hapi package.

Conclusion

The Denial of Service vulnerability in @hapi/hapi can have serious consequences for applications utilizing affected versions of the package. By sending requests with specific invalid header values, an attacker can cause the application to crash or exit unexpectedly, resulting in service disruptions or downtime. To mitigate this risk, it is crucial to upgrade to version 18.4.1, 19.1.1, or any later release of the @hapi/hapi package. For further assistance and support in addressing this vulnerability, please contact DevNack.com.

See every vulnerability recorded for @hapi/hapi →

Share this vulnerability

FAQ

@hapi/hapi is a Node.js framework for building web applications. It provides a range of features and utilities to simplify the development process.

A Denial of Service attack is a malicious attempt to disrupt the normal functioning of a system or network. It aims to make a service or resource unavailable to legitimate users by overwhelming it with a flood of illegitimate requests or by exploiting vulnerabilities in the system.

If your application uses an affected version of the @hapi/hapi package, it is vulnerable to a DoS attack. An attacker can send requests with specific invalid header values, causing the application to throw a system error and exit. This can result in a complete shutdown of the affected services, rendering them unavailable to legitimate users.

No, only versions prior to 18.4.1 or 19.1.1 of the @hapi/hapi package are vulnerable to this issue. It is recommended to upgrade to a patched version to mitigate the risk.

No, there is no known workaround for this vulnerability. The only effective solution is to upgrade to a patched version of the @hapi/hapi package.

How To Fix

Fixed versions by release line

The minimum fixed version depends on the release line you run.

  • < 18.4.1 18.4.1
    npm install @hapi/hapi@18.4.1
  • >= 19.0.0, < 19.1.1 19.1.1
    npm install @hapi/hapi@19.1.1

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. 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