GHSA-4rgj-8mq3-hggj: @hapi/subtext Denial of Service Vulnerability
HIGHGHSA-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.
GHSA-4rgj-8mq3-hggj at a Glance
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.
npm install @hapi/subtext@6.1.2
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
GHSA-4rgj-8mq3-hggj Affected @hapi/subtext Versions
1 component(s)| 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?
Which @hapi/subtext versions are affected?
What version fixes GHSA-4rgj-8mq3-hggj?
Is @hapi/subtext affected?
What CWE is associated with GHSA-4rgj-8mq3-hggj?
How can I check npm dependencies for GHSA-4rgj-8mq3-hggj?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"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
}
}