hoolock does not block Prototype pollution with object-path related utilities
Description
hoolock is a suite of lightweight utilities designed to maintain a small footprint when bundled. Starting in version 2.0.0 and prior to version 2.2.1, utility functions related to object paths (get, set, and update) did not block attempts to access or alter object prototypes. Starting in version 2.2.1, the get, set and update functions throw a TypeError when a user attempts to access or alter inherited properties.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
Prototype pollution vulnerability in hoolock v2.0.0–v2.2.0 allows attackers to modify object prototypes via the `get`, `set`, and `update` functions.
Vulnerability
Overview
CVE-2024-23339 is a prototype pollution vulnerability in hoolock, a lightweight utility library focused on maintaining a small bundle footprint [1]. From version 2.0.0 up to (but not including) version 2.2.1, the get, set, and update functions that handle object paths did not prevent access or modification of object prototypes [1]. This means an untrusted value submitted to these functions could pollute the Object prototype, leading to unexpected behavior across the application.
Attack
Surface and Exploitation
Exploitation requires an attacker to be able to supply a crafted object path—for example, __proto__ or constructor.prototype—to one of the vulnerable utility functions [1]. The set function is particularly dangerous because it allows direct assignment of properties along an arbitrary path, and without input sanitization the attacker can overwrite prototype properties. The attack does not require authentication beyond the ability to interact with functionality that uses hoolock's object-path utilities [1].
Impact
A successful prototype pollution attack can lead to property injection, denial of service, or—in some contexts—remote code execution if polluted properties affect security-sensitive logic or downstream deserialization. By altering inherited properties shared by all objects, the attacker can modify the behavior of the entire JavaScript runtime in a way that persists for the lifetime of the process [1].
Mitigation
The maintainers resolved the issue in hoolock version 2.2.1 by making the get, set, and update functions throw a TypeError whenever a user attempts to access or alter inherited properties [1]. Users should update to at least version 2.2.1; if upgrading is not immediately possible, any code that passes untrusted input to these functions should be audited and sanitized to block prototype-key patterns [2].
AI Insight generated on May 20, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
hoolocknpm | >= 2.0.0, < 2.2.1 | 2.2.1 |
Affected products
1- Range: >= 2.0.0, < 2.2.1
Patches
197ae80e85677Vulnerability mechanics
Generated on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
4- github.com/advisories/GHSA-4c2g-hx49-7h25ghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2024-23339ghsaADVISORY
- github.com/elijahharry/hoolock/commit/97ae80e856774335d92743c635ffeae2f652b982ghsax_refsource_MISCWEB
- github.com/elijahharry/hoolock/security/advisories/GHSA-4c2g-hx49-7h25ghsax_refsource_CONFIRMWEB
News mentions
0No linked articles in our index yet.