Vulnerabilities in pkg:npm/@hapi/subtext

PACKAGE
Advisory Summary

GHSA-4rgj-8mq3-hggj is a HIGH denial of service vulnerability (CWE-400: Uncontrolled Resource Consumption) affecting @hapi/subtext libraries in the npm ecosystem. The issue involves denial of service in @hapi/subtext. Remediation is available by upgrading affected packages to version 6.1.2.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:npm/@hapi/subtext

1 Known Advisory Record(s)

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

Advisory ID CVE / NVD Severity Summary
GHSA-4rgj-8mq3-hggj - HIGH Denial of Service in @hapi/subtext

GHSA-4rgj-8mq3-hggj at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-4rgj-8mq3-hggj
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-400: Uncontrolled Resource Consumption
Affected Product @hapi/subtext
Package Ecosystem npm
Published Date
Last Updated

How to Fix GHSA-4rgj-8mq3-hggj

To remediate this vulnerability, upgrade all affected @hapi/subtext 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/subtext fixed: 6.1.2
npm install @hapi/subtext@6.1.2
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/subtext

How to Check if You Are Affected

To determine whether your Node.js application is affected by GHSA-4rgj-8mq3-hggj, inspect your project dependencies using npm:

npm ls @hapi/subtext

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

Note: The npm ls @hapi/subtext 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 CWE-400: Uncontrolled Resource Consumption, where the product does not properly control the allocation and maintenance of a limited resource. In @hapi/subtext, 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/subtext` prior to 6.1.2 are vulnerable to Denial of Service (DoS). The package fails to enforce the `maxBytes` configuration for payloads with chunked encoding that are written to the file system. This allows attackers to send requests with arbitrary payload sizes, which may exhaust system resources leading to Denial of Service. ## Recommendation Upgrade to version 6.1.2 or later.

GHSA-4rgj-8mq3-hggj Affected @hapi/subtext Versions

1 component(s)
Fixed Versions:
6.1.2
Product / Package Ecosystem Affected Versions Fixed Version
@hapi/subtext
npm
< 6.1.2
6.1.2

References

Frequently Asked Questions

What is GHSA-4rgj-8mq3-hggj?
GHSA-4rgj-8mq3-hggj is a security vulnerability in @hapi/subtext involving Denial of Service in @hapi/subtext under CWE-400: Uncontrolled Resource Consumption.
Which @hapi/subtext versions are affected?
Affected versions include releases prior to 6.1.2 across affected packages: @hapi/subtext.
What version fixes GHSA-4rgj-8mq3-hggj?
Upgrading to 6.1.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is @hapi/subtext affected?
Yes, @hapi/subtext is affected in releases prior to 6.1.2. Upgrade your dependency to 6.1.2 or later.
What CWE is associated with GHSA-4rgj-8mq3-hggj?
GHSA-4rgj-8mq3-hggj is classified under CWE-400: Uncontrolled Resource Consumption (The product does not properly control the allocation and maintenance of a limited resource.).
How can I check npm dependencies for GHSA-4rgj-8mq3-hggj?
Run the dependency tree command: 'npm ls @hapi/subtext'. 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-4rgj-8mq3-hggj",
  "modified" : "2020-08-31T18:49:38Z",
  "published" : "2020-09-03T20:32:11Z",
  "aliases" : [ ],
  "summary" : "Denial of Service in @hapi/subtext",
  "details" : "Versions of `@hapi/subtext` prior to 6.1.2 are vulnerable to Denial of Service (DoS). The package fails to enforce the `maxBytes` configuration for payloads with chunked encoding that are written to the file system. This allows attackers to send requests with arbitrary payload sizes, which may exhaust system resources leading to Denial of Service.\n\n\n## Recommendation\n\nUpgrade to version 6.1.2 or later.",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@hapi/subtext"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "6.1.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/hapijs/subtext/issues/72"
  }, {
    "type" : "WEB",
    "url" : "https://www.npmjs.com/advisories/1165"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-400" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2020-08-31T18:49:38Z",
    "nvd_published_at" : null
  }
}