@phun-ky/defaults-deep Has a Prototype Pollution issue via Unsafe Recursive Property Merging
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__constructorprototype
Upgrading to a patched version remains the recommended mitigation.
Betroffene Software
Klicken Sie auf eine Technologie, um alle zugehörigen Schwachstellen anzuzeigen.
| Plattform | Paket | Anfällige Versionen | Behoben in |
|---|---|---|---|
| npm-Paket | @phun-ky/defaults-deep | < 2.0.5 | 2.0.5 |
Verweise
- https://github.com/phun-ky/defaults-deep/security/advisories/GHSA-mj3g-7xcc-x4vh
- https://github.com/phun-ky/defaults-deep/pull/49
- https://github.com/phun-ky/defaults-deep/commit/807dba930f8718f9126cad59d949b8fd3539b059
- https://github.com/phun-ky/defaults-deep
- https://github.com/phun-ky/defaults-deep/releases/tag/2.0.5
- CVSS-Vektor
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L- Schwäche (CWE)
CWE-1321- Plattform
- npm
- Paket
@phun-ky/defaults-deep- Veröffentlicht
- 31.07.2026
- Aktualisiert
- 11.10.2026 10:22
Quellen und Lizenzen
OSV / GitHub Advisory Database - GHSA-mj3g-7xcc-x4vh - CC BY 4.0
Schwachstellenhistorie: @phun-ky/defaults-deep
Alle veröffentlichten Schwachstellen dieses Pakets (npm-Paket), neueste zuerst. Zeigt, ob es ein einmaliger Ausrutscher ist oder ein Paket, das man im Auge behalten muss.
Dies ist die einzige bekannte Schwachstelle dieses Pakets.
Erkennen Sie Schwachstellen in Ihrer Anwendung
Mit der DockRay-Integration und aktivierter Softwareinventarisierung prüft DockRay gemeldete Komponentenversionen auf bekannte Schwachstellen und benachrichtigt Sie über bestätigte Treffer. Die Abdeckung hängt von der unterstützten Technologie und den verfügbaren Meldungen ab.