GHSA-3wqh-h42r-x8fq Denial of Service in @hapi/content

Not scored Published

An attacker can crash the application by sending a malformed Content-Encoding header, causing a system error that terminates the service.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is GHSA-3wqh-h42r-x8fq?

GHSA-3wqh-h42r-x8fq is a denial of service vulnerability in @hapi/content, published on 3 Sep 2020. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

Versions of @hapi/content prior to 4.1.1 and 5.0.1 are vulnerable to Denial of Service. The Content-Encoding HTTP header parser has a vulnerability which will cause the function to throw a system error if the header contains some invalid values. Because hapi rethrows system errors (as opposed to catching expected application errors), the error is thrown all the way up the stack. If no unhandled exception handler is available, the application will exist, allowing an attacker to shut down services.

Recommendation

Upgrade to version 5.0.2. Versions 4.1.1 and 5.0.1 are fixed but only available for direct download through the repository.

Which versions are affected by GHSA-3wqh-h42r-x8fq?

2 open source packages ship an affected version, including @hapi/content.

PackageAffectedFixed in
@hapi/content npmAll versions5.0.2
@hapi/content npmAll versions5.0.2

How do I fix GHSA-3wqh-h42r-x8fq?

Upgrade @hapi/content to 5.0.2 or later.

Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.

Is GHSA-3wqh-h42r-x8fq being exploited?

There is no known exploitation of GHSA-3wqh-h42r-x8fq in the wild and no public exploit code.

Sources

Is GHSA-3wqh-h42r-x8fq in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free