| name | exploiting-prototype-pollution-in-javascript |
| description | Detect and exploit JavaScript prototype pollution vulnerabilities on both client-side and server-side applications to achieve XSS, RCE, and authentication bypass through property injection. Use when detecting and exploit javascript prototype pollution vulnerabilities on both client-side. |
| domain | cybersecurity |
| tags | ["prototype-pollution","javascript","node-js","xss","rce","property-injection","dom-xss","server-side-pollution"] |
| subdomain | web-application-security |
| version | 1.0 |
| author | oyi77 |
| license | Apache-2.0 |
| nist_csf | ["PR.PS-01","ID.RA-01","PR.DS-10","DE.CM-01"] |
Exploiting Prototype Pollution In Javascript
Overview
Cybersecurity skill for exploiting prototype pollution in javascript. Follows industry best practices and security standards.
When to Use
Trigger phrases:
-
"exploiting prototype pollution in javascript"
-
"Detect and exploit JavaScript prototype pollution vulnerabilities on both client"
-
When testing Node.js or JavaScript-heavy web applications
-
During assessment of APIs accepting deep-merged JSON objects
-
When testing client-side JavaScript frameworks for DOM XSS via prototype pollution
-
During code review of object merge/clone/extend operations
-
When evaluating npm packages for prototype pollution gadgets
When NOT to Use
- When you lack proper authorization for testing
- For production systems without change management
- When the task requires legal or compliance expertise beyond technical scope
Prerequisites
- Burp Suite with DOM Invader extension for client-side prototype pollution detection
- Node.js development environment for server-side testing
- Understanding of JavaScript prototype chain and object inheritance
- Knowledge of common pollution gadgets (sources, sinks, and exploitable properties)
- Prototype Pollution Gadgets Scanner Burp extension for server-side detection
- Browser developer console for client-side prototype manipulation
Legal Notice: This skill is for authorized security testing and educational purposes only. Unauthorized use against systems you do not own or have written permission to test is illegal and may violate computer fraud laws.
Workflow
import re
IOC_PATTERNS = {
"ip": r"\b(?:\d{1,3}\.){3}\d{1,3}\b",
"domain": r"\b[a-z0-9-]+\.[a-z]{2,}\b",
"hash_md5": r"\b[a-f0-9]{32}\b",
"hash_sha256": r"\b[a-f0-9]{64}\b",
}
def extract_iocs() -> :
{k: re.findall(v, text) k, v IOC_PATTERNS.items()}