Denial of Service in @hapi/ammo

@hapi/ammo Updated 02 Oct 2025

Summary

03/09/2020
HIGH
Yes i
High
Not published

GHSA-gjph-xf5q-6mfq: Denial of Service in @hapi/ammo. Affects @hapi/ammo across 2 version ranges.

< 3.1.2 >= 4.0.0, < 5.0.1

Fixed in 3.1.2 or 5.0.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 MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

The @hapi/ammo package is an HTTP utility library for the hapi framework. It provides various functions and methods to handle HTTP requests and responses. However, versions prior to 3.1.2 or 5.0.1 are vulnerable to a Denial of Service (DoS) attack.

Vulnerability Detail

The vulnerability in @hapi/ammo lies in the Range HTTP header parser. If the header is set to an invalid value, the parser function throws a system error. Since hapi is not designed to handle such exceptions, the error propagates up the stack. If there is no unhandled exception handler, the application may crash, allowing an attacker to disrupt services. This vulnerability has a high severity rating.

How To Fix

Fixed versions by release line

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

  • < 3.1.2 3.1.2
    npm install @hapi/ammo@3.1.2
  • >= 4.0.0, < 5.0.1 5.0.1
    npm install @hapi/ammo@5.0.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. Upgrading to the fixed versions is the only solution.

Conclusion

The @hapi/ammo package is vulnerable to a Denial of Service attack due to a flaw in the Range HTTP header parser. Upgrading to version 3.1.2 or 5.0.1 is recommended to fix this vulnerability. For further support on vulnerability remediation, you can contact DevNack.com.

See every vulnerability recorded for @hapi/ammo →

Share this vulnerability

FAQ

@hapi/ammo is an HTTP utility library for the hapi framework, providing functions and methods to handle HTTP requests and responses.

A Denial of Service attack is an attempt to disrupt the normal functioning of a system or network by overwhelming it with a flood of illegitimate requests or excessive resource consumption.

The vulnerability in @hapi/ammo can lead to a DoS attack, causing the application to crash and potentially disrupting services.

You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability. Simply upload your package-lock.json file and Vulert will analyze it for vulnerabilities.

You can find more information about this vulnerability, including its technical details and the fixed versions, in the advisory on GitHub: https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2020/09/GHSA-gjph-xf5q-6mfq/GHSA-gjph-xf5q-6mfq.json

How To Fix

Fixed versions by release line

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

  • < 3.1.2 3.1.2
    npm install @hapi/ammo@3.1.2
  • >= 4.0.0, < 5.0.1 5.0.1
    npm install @hapi/ammo@5.0.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