Denial of Service in @hapi/subtext
Summary
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 ↓
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.
No signup required · Results in about 60 seconds
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.36.1.3npm install @hapi/subtext@6.1.3 -
>= 7.0.0, < 7.0.37.0.3npm 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 →
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.
References
Related vulnerabilities
Recent vulnerabilities recorded for @hapi/subtext.