Denial of Service Vulnerability in ammo

ammo Updated 02 Oct 2025

Summary

03/09/2020
HIGH
No i
High
Not published

GHSA-mg85-8mv5-ffjr: Denial of Service in ammo. Affects ammo versions >= 0.0.0. 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 Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

The ammo package is an open-source library used for parsing HTTP headers in Node.js applications. It is commonly used in conjunction with the hapi framework. The package is responsible for handling the Range HTTP header, which specifies the range of bytes requested in a resource. However, all versions of ammo are vulnerable to a Denial of Service (DoS) attack. This vulnerability arises from a flaw in the Range HTTP header parser, which throws a system error if the header is set to an invalid value. As hapi does not expect this function to throw an error, it propagates up the stack and can lead to the application crashing if no unhandled exception handler is present. This vulnerability allows an attacker to exploit the flaw and disrupt the services provided by the application.

Vulnerability Detail

The Denial of Service vulnerability in ammo arises from the improper handling of the Range HTTP header. By setting an invalid value for this header, an attacker can trigger a system error that propagates up the stack, potentially causing the application to crash. This can lead to a complete disruption of services provided by the application. The vulnerability affects all versions of ammo.

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

If updating the dependencies is not immediately feasible, a temporary workaround can be implemented. The workaround involves implementing a custom exception handler in the application to catch the system error thrown by the vulnerable ammo package. By handling the exception, the application can prevent it from propagating up the stack and crashing the services. Here is an example of how the custom exception handler can be implemented in a Node.js application:

process.on('uncaughtException', (err) => {
  // Handle the exception here
});

Conclusion

The Denial of Service vulnerability in the ammo package can be exploited by setting an invalid value for the Range HTTP header. This can lead to a system error and potentially crash the application, resulting in a disruption of services. To mitigate this vulnerability, it is recommended to update the dependencies of the affected application to use the maintained package @hapi/ammo. Alternatively, a temporary workaround can be implemented by adding a custom exception handler in the application. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for ammo →

Share this vulnerability

FAQ

The vulnerability allows an attacker to trigger a system error in the ammo package, potentially causing the application to crash. This can result in a complete disruption of services provided by the application.

All versions of ammo are vulnerable to this Denial of Service vulnerability.

Yes, the vulnerability can be fixed by updating the dependencies of the affected application to use the maintained package @hapi/ammo.

A temporary workaround involves implementing a custom exception handler in the application to catch the system error thrown by the vulnerable ammo package.

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