Denial of Service in @hapi/subtext

@hapi/subtext Updated 02 Oct 2025

Summary

03/09/2020
HIGH
Yes i
High
Not published

GHSA-3wqh-h42r-x8fq: Denial of Service in @hapi/subtext. Affects @hapi/subtext across 2 version ranges.

>= 6.1.0, < 6.1.3 >= 7.0.0, < 7.0.3

Fixed in 6.1.3 or 7.0.3, depending on the release line you run. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

The @hapi/subtext package is a part of the hapi ecosystem and is used for handling content encoding in HTTP headers. It provides functionality for parsing and decoding content encoding headers. However, versions prior to 6.1.3 or 7.0.3 are vulnerable to a Denial of Service (DoS) attack.

Vulnerability Detail

The vulnerability in @hapi/subtext is related to the Content-Encoding HTTP header parser. If the header contains certain invalid values, the function responsible for parsing the header will throw a system error. Since hapi rethrows system errors instead of catching them, the error propagates up the stack. If there is no unhandled exception handler available, the application will exit, allowing an attacker to shut down services. This vulnerability can be exploited to cause a DoS attack on the affected application.

How To Fix

Latest published version: 8.1.4 as of 23 Oct 2026

npm install @hapi/subtext@8.1.4

Upgrading to it may include breaking changes; the versions below are the minimum fixed release for this vulnerability.

If you can't move to the latest

The minimum fixed version depends on the release line you run.

  • >= 6.1.0, < 6.1.3 6.1.3
    npm install @hapi/subtext@6.1.3
  • >= 7.0.0, < 7.0.3 7.0.3
    npm install @hapi/subtext@7.0.3

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Workaround

There is no known workaround for this vulnerability. It is essential to upgrade to the fixed versions of the package.

Conclusion

The @hapi/subtext package is vulnerable to a DoS attack due to a flaw in the Content-Encoding HTTP header parser. Upgrading to version 6.1.3 or 7.0.3 of the package is recommended to mitigate this vulnerability. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for @hapi/subtext →

Share this vulnerability

FAQ

@hapi/subtext is a package in the hapi ecosystem that handles content encoding in HTTP headers.

Versions prior to 6.1.3 or 7.0.3 of @hapi/subtext are vulnerable to this DoS attack.

This vulnerability can be exploited to cause a DoS attack, potentially shutting down services of the affected application.

To fix this vulnerability, upgrade to version 6.1.3 or 7.0.3 of @hapi/subtext.

No, there is no known workaround for this vulnerability. Upgrading to the fixed versions is necessary.

Related vulnerabilities

Recent vulnerabilities recorded for @hapi/subtext.

How To Fix

Latest published version: 8.1.4 as of 23 Oct 2026

npm install @hapi/subtext@8.1.4

Upgrading to it may include breaking changes; the versions below are the minimum fixed release for this vulnerability.

If you can't move to the latest

The minimum fixed version depends on the release line you run.

  • >= 6.1.0, < 6.1.3 6.1.3
    npm install @hapi/subtext@6.1.3
  • >= 7.0.0, < 7.0.3 7.0.3
    npm install @hapi/subtext@7.0.3

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback