Skip to content
KitploitKITPLOIT
ToolsBlog
Submit
ToolsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
CVE-2026-3030-Prototype-Pollution-in-JSON-Merge-Patch — Demonstrates CVE-2026-3030 prototype pollution in a Node.js JSON merge patch REST API, including a vulnerable server and exploit script for privilege escalation. | Kitploit
Tools/GitHubGitHub/george0papasotiriou/cve-2026-3030-prototype-pollution-in-json-merge-patch
Privilege EscalationVulnerability AnalysisExploitationWeb Application ExploitationWeb SecurityLearning & EducationAPI Security
GitHubgeorge0papasotiriou/cve-2026-3030-prototype-pollution-in-json-merge-patch

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share

CVE-2026-3030-Prototype-Pollution-in-JSON-Merge-Patch

Demonstrates CVE-2026-3030 prototype pollution in a Node.js JSON merge patch REST API, including a vulnerable server and exploit script for privilege escalation.

View Repository
51 month agoNot yet reviewed

CVE-2026-3030 – Prototype Pollution in JSON Merge Patch

Program Code (Node.js)

root@kitploit:~
// server.js - Vulnerable REST API with deep merge
const express = require('express');
const app = express();
app.use(express.json());

let config = {
    role: 'user',
    settings: {}
};

// Insecure deep merge function (pollutable via __proto__)
function deepMerge(target, source) {
    for (const key in source) {
        if (source[key] && typeof source[key] === 'object' && !Array.isArray(source[key])) {
            if (!target[key]) target[key] = {};
            deepMerge(target[key], source[key]);
        } else {
            target[key] = source[key];
        }
    }
    return target;
}

app.patch('/config', (req, res) => {
    deepMerge(config, req.body);
    res.json(config);
});

app.get('/admin', (req, res) => {
    // Check admin via a property that could be polluted
    if (config.role === 'admin' || config.isAdmin) {
        res.send('Welcome Admin!');
    } else {
        res.status(403).send('Forbidden');
    }
});

app.listen(3000, () => console.log('Server on :3000'));

CVE-2026-3030 – Prototype Pollution via JSON Merge Patch

Severity: High

Overview

A Node.js API uses a vulnerable deep merge function to apply JSON patches. By sending __proto__ as a key, an attacker can pollute the global object prototype, adding or overriding properties such as isAdmin, leading to privilege escalation.

Vulnerability Details

  • Type: Prototype Pollution
  • Impact: Privilege escalation, denial of service, sometimes RCE.
  • Root Cause: The deepMerge function copies keys without checking for __proto__ or constructor, allowing injection into Object.prototype.

Exploit Demonstration

  1. Start the server:
    root@kitploit:~
    npm install express
    node server.js
    
  2. Run the exploit:
    root@kitploit:~
    python exploit_prototype_pollution.py
    
Download Tool