Prototype Pollution in @hapi/hoek

@hapi/hoek Updated 02 Oct 2025

Summary

04/09/2020
LOW
Yes i
Low
Not published

GHSA-22h7-7wwg-qmgg: Prototype Pollution in @hapi/hoek. Affects @hapi/hoek across 2 version ranges.

>= 8.3.2, < 8.5.1 >= 9.0.0, < 9.0.3

Fixed in 8.5.1 or 9.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 Your last release was probably never penetration tested 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/hoek package is a utility library used by the hapi framework and other applications. It provides various functions for manipulating objects, arrays, and other data structures. However, versions prior to 8.5.1 and 9.0.3 of @hapi/hoek are vulnerable to Prototype Pollution.

Vulnerability Detail

Prototype Pollution is a vulnerability that occurs when an application allows user-controlled input to modify the prototype of an object. In the case of @hapi/hoek, the clone function fails to prevent the modification of the Object prototype when passed specially-crafted input. This can lead to the modification of existing properties that exist in all objects, potentially resulting in Denial of Service or Remote Code Execution in certain scenarios. It's important to note that hapi applications are not affected by this vulnerability as the framework protects against such malicious inputs. However, applications using @hapi/hoek outside of the hapi ecosystem may be vulnerable.

How To Fix

Fixed versions by release line

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

  • >= 8.3.2, < 8.5.1 8.5.1
    npm install @hapi/hoek@8.5.1
  • >= 9.0.0, < 9.0.3 9.0.3
    npm install @hapi/hoek@9.0.3

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

Conclusion

The Prototype Pollution vulnerability in @hapi/hoek can have serious consequences, including Denial of Service or Remote Code Execution. It is crucial to update to the recommended versions to mitigate the risk. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for @hapi/hoek →

Share this vulnerability

FAQ

Prototype Pollution is a vulnerability that occurs when an application allows user-controlled input to modify the prototype of an object. This can lead to unexpected behavior and security issues.

Versions prior to 8.5.1 and 9.0.3 of @hapi/hoek are vulnerable to Prototype Pollution. The clone function fails to prevent the modification of the Object prototype when passed specially-crafted input.

No, hapi applications are not affected by this vulnerability as the framework protects against such malicious inputs.

The modification of existing properties that exist in all objects can lead to Denial of Service or Remote Code Execution in specific circumstances.

To fix this vulnerability, update to version 8.5.1, 9.0.3, or any later version of @hapi/hoek.

Related vulnerabilities

Recent vulnerabilities recorded for @hapi/hoek.

How To Fix

Fixed versions by release line

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

  • >= 8.3.2, < 8.5.1 8.5.1
    npm install @hapi/hoek@8.5.1
  • >= 9.0.0, < 9.0.3 9.0.3
    npm install @hapi/hoek@9.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