Vulnerabilities in pkg:npm/@hapi/hapi

PACKAGE
Advisory Summary

GHSA-23vw-mhv5-grv5 is a HIGH denial of service vulnerability (General Security Weakness) affecting @hapi/hapi libraries in the npm ecosystem. The issue involves denial of service in @hapi/hapi. Remediation is available by upgrading affected packages to version 18.4.1, 19.1.1.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:npm/@hapi/hapi

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:npm/@hapi/hapi. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-23vw-mhv5-grv5 - HIGH Denial of Service in @hapi/hapi

GHSA-23vw-mhv5-grv5 at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-23vw-mhv5-grv5
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification General Security Weakness
Affected Product @hapi/hapi
Package Ecosystem npm
Published Date
Last Updated

How to Fix GHSA-23vw-mhv5-grv5

To remediate this vulnerability, upgrade all affected @hapi/hapi 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/hapi fixed: 18.4.1
npm install @hapi/hapi@18.4.1
@hapi/hapi fixed: 19.1.1
npm install @hapi/hapi@19.1.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/hapi

How to Check if You Are Affected

To determine whether your Node.js application is affected by GHSA-23vw-mhv5-grv5, inspect your project dependencies using npm:

npm ls @hapi/hapi

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

Note: The npm ls @hapi/hapi 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/hapi, 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/hapi` prior to 18.4.1 or 19.1.1 are vulnerable to Denial of Service. The CORS request handler has a vulnerability which will cause the function to throw a system error if the header contains some invalid values. If no unhandled exception handler is available, the application will exist, allowing an attacker to shut down services. ## Recommendation Upgrade to versions 18.4.1, 19.1.1 or later.

GHSA-23vw-mhv5-grv5 Affected @hapi/hapi Versions

2 component(s)
Fixed Versions:
18.4.119.1.1
Product / Package Ecosystem Affected Versions Fixed Version
@hapi/hapi
npm
< 18.4.1
18.4.1
@hapi/hapi
npm
≥ 19.0.0
< 19.1.1
19.1.1

References

Frequently Asked Questions

What is GHSA-23vw-mhv5-grv5?
GHSA-23vw-mhv5-grv5 is a security vulnerability in @hapi/hapi involving Denial of Service in @hapi/hapi under General Security Weakness.
Which @hapi/hapi versions are affected?
Affected versions include releases prior to 18.4.1, 19.1.1 across affected packages: @hapi/hapi.
What version fixes GHSA-23vw-mhv5-grv5?
Upgrading to 18.4.1, 19.1.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is @hapi/hapi affected?
Yes, @hapi/hapi is affected in releases prior to 18.4.1, 19.1.1. Upgrade your dependency to 18.4.1, 19.1.1 or later.
What CWE is associated with GHSA-23vw-mhv5-grv5?
GHSA-23vw-mhv5-grv5 is classified under General Security Weakness.
How can I check npm dependencies for GHSA-23vw-mhv5-grv5?
Run the dependency tree command: 'npm ls @hapi/hapi'. 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-23vw-mhv5-grv5",
  "modified" : "2020-08-31T19:00:56Z",
  "published" : "2020-09-03T15:48:43Z",
  "aliases" : [ ],
  "summary" : "Denial of Service in @hapi/hapi",
  "details" : "Versions of `@hapi/hapi` prior to 18.4.1 or 19.1.1 are vulnerable to Denial of Service. The CORS request handler has a vulnerability which will cause the function to throw a system error if the header contains some invalid values. 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 versions 18.4.1, 19.1.1 or later.",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@hapi/hapi"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "18.4.1"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@hapi/hapi"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "19.0.0"
      }, {
        "fixed" : "19.1.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://www.npmjs.com/advisories/1482"
  } ],
  "database_specific" : {
    "cwe_ids" : [ ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2020-08-31T19:00:56Z",
    "nvd_published_at" : null
  }
}