GHSA-gjph-xf5q-6mfq: @hapi/ammo Denial of Service Vulnerability

HIGH
Published
Advisory Summary

GHSA-gjph-xf5q-6mfq is a HIGH denial of service vulnerability (General Security Weakness) affecting @hapi/ammo libraries in the npm ecosystem. The issue involves denial of service in @hapi/ammo. Remediation is available by upgrading affected packages to version 3.1.2, 5.0.1.

GHSA-gjph-xf5q-6mfq at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-gjph-xf5q-6mfq
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification General Security Weakness
Affected Product @hapi/ammo
Package Ecosystem npm
Published Date
Last Updated

How to Fix GHSA-gjph-xf5q-6mfq

To remediate this vulnerability, upgrade all affected @hapi/ammo dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

@hapi/ammo fixed: 3.1.2
npm install @hapi/ammo@3.1.2
@hapi/ammo fixed: 5.0.1
npm install @hapi/ammo@5.0.1
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls @hapi/ammo

How to Check if You Are Affected

To determine whether your Node.js application is affected by GHSA-gjph-xf5q-6mfq, inspect your project dependencies using npm:

npm ls @hapi/ammo

Analyze the terminal output to locate any version of @hapi/ammo in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.1.2), your application is affected.

Note: The npm ls @hapi/ammo command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under General Security Weakness. In @hapi/ammo, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

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.

GHSA-gjph-xf5q-6mfq Affected @hapi/ammo Versions

2 component(s)
Fixed Versions:
3.1.25.0.1
Product / Package Ecosystem Affected Versions Fixed Version
@hapi/ammo
npm
< 3.1.2
3.1.2
@hapi/ammo
npm
≥ 4.0.0
< 5.0.1
5.0.1

References

Frequently Asked Questions

What is GHSA-gjph-xf5q-6mfq?
GHSA-gjph-xf5q-6mfq is a security vulnerability in @hapi/ammo involving Denial of Service in @hapi/ammo under General Security Weakness.
Which @hapi/ammo versions are affected?
Affected versions include releases prior to 3.1.2, 5.0.1 across affected packages: @hapi/ammo.
What version fixes GHSA-gjph-xf5q-6mfq?
Upgrading to 3.1.2, 5.0.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is @hapi/ammo affected?
Yes, @hapi/ammo is affected in releases prior to 3.1.2, 5.0.1. Upgrade your dependency to 3.1.2, 5.0.1 or later.
What CWE is associated with GHSA-gjph-xf5q-6mfq?
GHSA-gjph-xf5q-6mfq is classified under General Security Weakness.
How can I check npm dependencies for GHSA-gjph-xf5q-6mfq?
Run the dependency tree command: 'npm ls @hapi/ammo'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-gjph-xf5q-6mfq",
  "modified" : "2020-08-31T19:00:37Z",
  "published" : "2020-09-03T15:46:02Z",
  "aliases" : [ ],
  "summary" : "Denial of Service in @hapi/ammo",
  "details" : "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.\n\n\n## Recommendation\n\nUpgrade to version 3.1.2 or 5.0.1.",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@hapi/ammo"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "3.1.2"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@hapi/ammo"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "4.0.0"
      }, {
        "fixed" : "5.0.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://www.npmjs.com/advisories/1474"
  } ],
  "database_specific" : {
    "cwe_ids" : [ ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2020-08-31T19:00:37Z",
    "nvd_published_at" : null
  }
}