Vulnerabilities in pkg:npm/@theecryptochad/merge-guard

PACKAGE
Advisory Summary

GHSA-mhwj-73qx-jqxm is a HIGH (CVSS 7.5) @theecryptochad/merge-guard has prototype pollution vulnerability (CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution')) affecting @theecryptochad/merge guard libraries in the npm ecosystem. The issue involves @theecryptochad/merge-guard has prototype pollution in its deepmerge() function. Remediation is available by upgrading affected packages to version 1.0.1.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:npm/@theecryptochad/merge-guard

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:npm/@theecryptochad/merge-guard. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-mhwj-73qx-jqxm - HIGH @theecryptochad/merge-guard has Prototype Pollution in its deepMerge() function

GHSA-mhwj-73qx-jqxm at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-mhwj-73qx-jqxm
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution')
Affected Product @theecryptochad/merge guard
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 7.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity High (I:H)
Availability None (A:N)

How to Fix GHSA-mhwj-73qx-jqxm

To remediate this vulnerability, upgrade all affected @theecryptochad/merge guard dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

@theecryptochad/merge-guard fixed: 1.0.1
npm install @theecryptochad/merge-guard@1.0.1
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls @theecryptochad/merge-guard

How to Check if You Are Affected

To determine whether your Node.js application is affected by GHSA-mhwj-73qx-jqxm, inspect your project dependencies using npm:

npm ls @theecryptochad/merge-guard

Analyze the terminal output to locate any version of @theecryptochad/merge guard in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.0.1), your application is affected.

Note: The npm ls @theecryptochad/merge-guard command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution'), where the product receives input from an upstream component that specifies attributes that are to be initialized or updated in an object, but it does not properly control modifications of attributes of the object prototype. In @theecryptochad/merge guard, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

## Summary `@theecryptochad/merge-guard` versions prior to 1.0.1 are vulnerable to Prototype Pollution via the `deepMerge()` function. An attacker who controls the source object can inject `__proto__` keys that mutate `Object.prototype`, affecting all objects in the Node.js runtime. ## Details The `deepMerge()` function recursively merges two objects without sanitizing reserved property keys (`__proto__`, `constructor`, `prototype`). When a source object contains a `__proto__` key, its value is assigned to `target.__proto__`, which JavaScript engines interpret as a write to `Object.prototype`. ## Proof of Concept ```js const { deepMerge } = require('@theecryptochad/merge-guard'); const payload = JSON.parse('{"__proto__":{"isAdmin":true}}'); deepMerge({}, payload); console.log({}.isAdmin); // true — Object.prototype is polluted ``` ## Impact Any application using `deepMerge()` with untrusted input (e.g. user-supplied JSON from HTTP requests, WebSocket messages, or config files) is vulnerable. An attacker can inject arbitrary properties onto `Object.prototype`, enabling privilege escalation, application logic bypass, and property injection. ## Remediation Upgrade to `@theecryptochad/merge-guard >= 1.0.1`, which adds an explicit blocklist: ```js const BLOCKED = new Set(['__proto__', 'constructor', 'prototype']); if (BLOCKED.has(key)) continue; ``` ## References - [CWE-1321: Improper Neutralization of Special Elements in Object Keys](https://cwe.mitre.org/data/definitions/1321.html) - [OWASP: Prototype Pollution](https://owasp.org/www-community/attacks/Prototype_Pollution) - [Fix commit](https://github.com/TheeCryptoChad/merge-guard/releases/tag/v1.0.1)

GHSA-mhwj-73qx-jqxm Affected @theecryptochad/merge guard Versions

1 component(s)
Fixed Versions:
1.0.1
Product / Package Ecosystem Affected Versions Fixed Version
@theecryptochad/merge-guard
npm
< 1.0.1
1.0.1

References

Frequently Asked Questions

What is GHSA-mhwj-73qx-jqxm?
GHSA-mhwj-73qx-jqxm is a security vulnerability in @theecryptochad/merge guard involving @theecryptochad/merge-guard has Prototype Pollution in its deepMerge() function under CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution').
Which @theecryptochad/merge guard versions are affected?
Affected versions include releases prior to 1.0.1 across affected packages: @theecryptochad/merge-guard.
What version fixes GHSA-mhwj-73qx-jqxm?
Upgrading to 1.0.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is @theecryptochad/merge-guard affected?
Yes, @theecryptochad/merge-guard is affected in releases prior to 1.0.1. Upgrade your dependency to 1.0.1 or later.
What is the CVSS score of GHSA-mhwj-73qx-jqxm?
GHSA-mhwj-73qx-jqxm has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N.
What CWE is associated with GHSA-mhwj-73qx-jqxm?
GHSA-mhwj-73qx-jqxm is classified under CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution') (The product receives input from an upstream component that specifies attributes that are to be initialized or updated in an object, but it does not properly control modifications of attributes of the object prototype.).
How can I check npm dependencies for GHSA-mhwj-73qx-jqxm?
Run the dependency tree command: 'npm ls @theecryptochad/merge-guard'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-mhwj-73qx-jqxm",
  "modified" : "2026-05-11T16:10:12Z",
  "published" : "2026-05-11T16:10:12Z",
  "aliases" : [ ],
  "summary" : "@theecryptochad/merge-guard has Prototype Pollution in its deepMerge() function",
  "details" : "## Summary\n\n`@theecryptochad/merge-guard` versions prior to 1.0.1 are vulnerable to Prototype Pollution via the `deepMerge()` function. An attacker who controls the source object can inject `__proto__` keys that mutate `Object.prototype`, affecting all objects in the Node.js runtime.\n\n## Details\n\nThe `deepMerge()` function recursively merges two objects without sanitizing reserved property keys (`__proto__`, `constructor`, `prototype`). When a source object contains a `__proto__` key, its value is assigned to `target.__proto__`, which JavaScript engines interpret as a write to `Object.prototype`.\n\n## Proof of Concept\n\n```js\nconst { deepMerge } = require('@theecryptochad/merge-guard');\nconst payload = JSON.parse('{\"__proto__\":{\"isAdmin\":true}}');\ndeepMerge({}, payload);\nconsole.log({}.isAdmin); // true — Object.prototype is polluted\n```\n\n## Impact\n\nAny application using `deepMerge()` with untrusted input (e.g. user-supplied JSON from HTTP requests, WebSocket messages, or config files) is vulnerable. An attacker can inject arbitrary properties onto `Object.prototype`, enabling privilege escalation, application logic bypass, and property injection.\n\n## Remediation\n\nUpgrade to `@theecryptochad/merge-guard >= 1.0.1`, which adds an explicit blocklist:\n\n```js\nconst BLOCKED = new Set(['__proto__', 'constructor', 'prototype']);\nif (BLOCKED.has(key)) continue;\n```\n\n## References\n- [CWE-1321: Improper Neutralization of Special Elements in Object Keys](https://cwe.mitre.org/data/definitions/1321.html)\n- [OWASP: Prototype Pollution](https://owasp.org/www-community/attacks/Prototype_Pollution)\n- [Fix commit](https://github.com/TheeCryptoChad/merge-guard/releases/tag/v1.0.1)",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@theecryptochad/merge-guard"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.0.1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/TheeCryptoChad/merge-guard/security/advisories/GHSA-mhwj-73qx-jqxm"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/TheeCryptoChad/merge-guard/commit/25e4b4f2618578a656ef3cb4946a1b475f736736"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/TheeCryptoChad/merge-guard"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-1321" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-05-11T16:10:12Z",
    "nvd_published_at" : null
  }
}