CVE-2026-54737
JSON

7.3high

@phun-ky/defaults-deep Has a Prototype Pollution issue via Unsafe Recursive Property Merging

Severity
7.3high CVSS:3.1 by GitHub_M
Exploit likelihood
0.26% (higher than 19% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-mj3g-7xcc-x4vh

Description

@phun-ky/defaults-deep is a library like lodash defaultsDeep with array preservation and no lodash dependency. Prior to 2.0.5, defaultsDeep() recursively merges user-supplied objects without filtering proto, constructor, and prototype, allowing properties to be written to Object.prototype. This issue is fixed in version 2.0.5.

Affected

Product or packageVersionsReported by
phun-ky defaults-deep< 2.0.5CVE List
@phun-ky/defaults-deep (npm)before 2.0.5GitHub Advisory Database

All scores

GitHub_M7.3high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L
GitHub7.3high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L

Classification

CWE-1321

SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial.

What each source says

CVE List

@phun-ky/defaults-deep is a library like lodash defaultsDeep with array preservation and no lodash dependency. Prior to 2.0.5, defaultsDeep() recursively merges user-supplied objects without filtering proto, constructor, and prototype, allowing properties to be written to Object.prototype. This issue is fixed in version 2.0.5.

GitHub Advisory Database
Impact

A prototype pollution vulnerability exists in @phun-ky/defaults-deep prior to version 2.0.5.

The library recursively merged user-supplied objects without filtering unsafe property names such as __proto__, constructor, and prototype. An attacker able to supply crafted input could cause properties to be written to Object.prototype, resulting in prototype pollution affecting all objects within the running process.

Applications that pass untrusted input to defaultsDeep() may be impacted. Depending on how the application uses merged objects, this could lead to unexpected behavior, logic bypasses, denial of service, or other security issues.

Patches

This issue has been fixed in version 2.0.5.

Users should upgrade to version 2.0.5 or later.

The fix prevents unsafe prototype-related keys (__proto__, constructor, and prototype) from being processed during recursive merge operations and includes regression tests covering known prototype pollution vectors.

Workarounds

Users unable to upgrade should ensure that untrusted input is sanitized before being passed to defaultsDeep().

At a minimum, applications should reject or remove the following property names from all levels of user-controlled objects:

  • __proto__
  • constructor
  • prototype

Upgrading to a patched version remains the recommended mitigation.

NVD (es)

@phun-ky/defaults-deep es una biblioteca similar a lodash defaultsDeep con preservación de arrays y sin dependencia de lodash. Antes de la versión 2.0.5, defaultsDeep() fusiona recursivamente objetos proporcionados por el usuario sin filtrar proto, constructor y prototype, permitiendo que las propiedades se escriban en Object.prototype. Este problema está solucionado en la versión 2.0.5.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-54737 changed 2026-07-31CVE Terms of Use
GitHub Advisory DatabaseGHSA-mj3g-7xcc-x4vh changed 2026-07-31CC-BY-4.0
NVDCVE-2026-54737 changed 2026-10-23Public domain