# JavaScript prototype pollution

An attacker-controlled property path changes inherited object state, which can affect unrelated objects and security-sensitive consumers.

**Candidate CWE:** [CWE-1321](https://cwe.mitre.org/data/definitions/1321.html)

## Test hypothesis

Trace recursive merge, object-path setter, or property assignment from a supported input. In an isolated fresh process, use a synthetic property and check inheritance on a newly created object. Then identify a concrete consumer whose behavior changes; compare own-property/schema validation and reset the process between attempts.

## Evidence required

Polluting path, input parser behavior, affected prototype/property, fresh-object observation, reachable consumer, and demonstrated consequence. Keep pollution primitive and downstream impact separate.

## Rule out false positives

A special key is merely an ordinary own property; null-prototype maps or key validation block prototype access; state change requires modifying the process yourself; or no supported attacker input reaches the setter.

## Playbook and command references

- [Source review: entry point to protected operation](https://bug-bounty-field-manual.kmahshooq.chatgpt.site/modules/source-dataflow.html) — Trace attacker control and authorization through handlers, services, queues, and sensitive operations; promote only reachable violations of a stated invariant.
- [Libraries and parsers: bounded fuzzing to a minimal reproducer](https://bug-bounty-field-manual.kmahshooq.chatgpt.site/modules/parser-fuzzing.html) — Build a realistic local harness, instrument the target, bound fuzzing resources, and turn unique faults into defensible library or consumer reports.

[Find the associated command snippets](https://bug-bounty-field-manual.kmahshooq.chatgpt.site/commands.html?q=Source%20review%3A%20entry%20point%20to%20protected%20operation)

## Referenced by these target playbooks

[OSS & self-hosted](https://bug-bounty-field-manual.kmahshooq.chatgpt.site/oss.html) · [Web & API](https://bug-bounty-field-manual.kmahshooq.chatgpt.site/web-api.html) · [Desktop & extensions](https://bug-bounty-field-manual.kmahshooq.chatgpt.site/desktop.html) · [AI, agents & MCP](https://bug-bounty-field-manual.kmahshooq.chatgpt.site/ai.html)

## Report checklist

- [ ] Capture the affected version, configuration, identities, and object ownership.
- [ ] Preserve a valid baseline and a negative control.
- [ ] Reproduce the forbidden data access, action, or state change on controlled fixtures.
- [ ] Explain the intended security rule and why the observed behavior violates it.
- [ ] State prerequisites, uncertainty, cleanup, and the smallest demonstrated impact.

## Conditional ATT&CK mapping

No direct ATT&CK mapping selected. Record the weakness and demonstrated impact without forcing an adversary-behavior classification. See the [mapping guide](https://bug-bounty-field-manual.kmahshooq.chatgpt.site/attack.html).

## Primary references

- [OWASP prototype pollution prevention](https://cheatsheetseries.owasp.org/cheatsheets/Prototype_Pollution_Prevention_Cheat_Sheet.html)

[Back to the complete vulnerability catalog](https://bug-bounty-field-manual.kmahshooq.chatgpt.site/vulnerabilities.html)
