GHSA-gjph-xf5q-6mfq Denial of Service in @hapi/ammo
An attacker can crash the application by sending a malformed Range HTTP header, causing an unhandled exception in the @hapi/ammo library.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is GHSA-gjph-xf5q-6mfq?
GHSA-gjph-xf5q-6mfq is a denial of service vulnerability in @hapi/ammo, published on 3 Sep 2020. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
Versions of @hapi/ammo prior to 3.1.2 or 5.0.1 are vulnerable to Denial of Service. The Range HTTP header parser has a vulnerability which will cause the function to throw a system error if the header is set to an invalid value. Because hapi is not expecting the function to ever throw, the error is thrown all the way up the stack. If no unhandled exception handler is available, the application will exist, allowing an attacker to shut down services.
Recommendation
Upgrade to version 3.1.2 or 5.0.1.
Which versions are affected by GHSA-gjph-xf5q-6mfq?
4 open source packages ship an affected version, including @hapi/ammo.
| Package | Affected | Fixed in |
|---|---|---|
@hapi/ammo npm | All versions | 3.1.2 |
@hapi/ammo npm | All versions | 3.1.2 |
@hapi/ammo npm | From 4.0.0 | 5.0.1 |
@hapi/ammo npm | From 4.0.0 | 5.0.1 |
How do I fix GHSA-gjph-xf5q-6mfq?
Upgrade @hapi/ammo to a fixed version for your release line: 3.1.2 or 5.0.1.
Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.
Is GHSA-gjph-xf5q-6mfq being exploited?
There is no known exploitation of GHSA-gjph-xf5q-6mfq in the wild and no public exploit code.