<!-- Copyright (c) 2026 defconxt. All rights reserved. -->
<!-- Licensed under AGPL-3.0 — see LICENSE file for details. -->
<!-- NERF is a trademark of defconxt. -->
---
name: hunting-prototype-pollution-bugs
description: >-
  Hunt for prototype pollution in JavaScript applications by identifying merge/extend gadgets, testing property injection on Object.prototype, and chaining to XSS or RCE.
domain: cybersecurity
subdomain: bug-bounty
tags:
  - prototype-pollution
  - javascript
  - gadget-chain
  - property-injection
version: "1.0"
author: defconxt
license: AGPL-3.0
metadata:
  mitre-attack: ["T1059.007"]
  frameworks: ["MITRE ATT&CK", "OWASP"]
  tools: ["burpsuite", "ppmap", "semgrep"]
---

# Hunting Prototype Pollution Bugs

## Overview

Hunt for prototype pollution in JavaScript applications by identifying merge/extend gadgets, testing property injection on Object.prototype, and chaining to XSS or RCE.

## Prerequisites

| Tool / Requirement | Details |
|---|---|
| `burpsuite` | Security tooling |
| `ppmap` | Security tooling |
| `semgrep` | Security tooling |
| Burp Suite, ppmap, semgrep, target JavaScript application | Environment requirement |

## Quick Reference

```bash
# Quick start commands
node scripts/agent.js --help
node scripts/agent.js scan --url https://target.com
```

## Workflow

### Step 1: Scan for Pollution Points

```bash
node scripts/agent.js scan --url https://target.com
```

### Step 2: Test Property Injection

```bash
node scripts/agent.js test --url https://target.com --property __proto__
```

### Step 3: Find Gadget Chains

```bash
node scripts/agent.js gadgets --url https://target.com --library lodash
```


## Verification

- **Verify scan results**: `node scripts/agent.js scan --url https://target.com`
- **Confirm pollution**: `node scripts/agent.js test --url https://target.com --property __proto__`

## References

- MITRE ATT&CK: T1059.007
- Frameworks: MITRE ATT&CK, OWASP
- Tools: burpsuite, ppmap, semgrep
