Vulnerabilities in pkg:npm/subtext

PACKAGE
Advisory Summary

GHSA-2mvq-xp48-4c77 is a HIGH denial of service vulnerability (CWE-400: Uncontrolled Resource Consumption) affecting Subtext libraries in the npm ecosystem. The issue involves denial of service in subtext. Remediation is available in the latest vendor maintenance releases.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:npm/subtext

1 Known Advisory Record(s)

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

Advisory ID CVE / NVD Severity Summary
GHSA-2mvq-xp48-4c77 - HIGH Denial of Service in subtext

GHSA-2mvq-xp48-4c77 at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-2mvq-xp48-4c77
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-400: Uncontrolled Resource Consumption
Affected Product Subtext
Package Ecosystem npm
Published Date
Last Updated

How to Fix GHSA-2mvq-xp48-4c77

To remediate this vulnerability, upgrade all affected 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.

subtext fixed: Latest secure release
npm install subtext@Latest secure release
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 subtext

How to Check if You Are Affected

To determine whether your Node.js application is affected by GHSA-2mvq-xp48-4c77, inspect your project dependencies using npm:

npm ls subtext

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

Note: The npm ls 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 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

All versions of `subtext` 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 This package is not actively maintained and has been moved to `@hapi/subtext` where version 6.1.2.

GHSA-2mvq-xp48-4c77 Affected Subtext Versions

1 component(s)
Product / Package Ecosystem Affected Versions Fixed Version
subtext
npm
≥ 0.0.0

References

Frequently Asked Questions

What is GHSA-2mvq-xp48-4c77?
GHSA-2mvq-xp48-4c77 is a security vulnerability in Subtext involving Denial of Service in subtext under CWE-400: Uncontrolled Resource Consumption.
Which Subtext versions are affected?
Affected versions include releases prior to current release patches across affected packages: subtext.
What version fixes GHSA-2mvq-xp48-4c77?
Upgrading to current release patches (or the latest patched release for your respective branch) resolves the vulnerability.
Is subtext affected?
Yes, subtext is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What CWE is associated with GHSA-2mvq-xp48-4c77?
GHSA-2mvq-xp48-4c77 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-2mvq-xp48-4c77?
Run the dependency tree command: 'npm ls 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-2mvq-xp48-4c77",
  "modified" : "2021-09-29T18:37:04Z",
  "published" : "2020-09-03T20:35:29Z",
  "aliases" : [ ],
  "summary" : "Denial of Service in subtext",
  "details" : "All versions of `subtext` 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\nThis package is not actively maintained and has been moved to `@hapi/subtext` where version 6.1.2.",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "subtext"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.0.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/hapijs/subtext/issues/72"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/hapijs/subtext"
  }, {
    "type" : "WEB",
    "url" : "https://www.npmjs.com/advisories/1168"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-400" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2020-08-31T18:49:45Z",
    "nvd_published_at" : null
  }
}