In-depth lesson · Prototype pollution
Tips for beginners
Every point the Prototype pollution reports back under this heading, best-backed first, each with the reports it is seen in.
-
Start by looking for libraries and application code that merge, extend, clone, or set nested properties using user-controlled keys. The evidence lists many npm packages and patterns, such as dot-prop, object-path-set, extend-merge, klona, and jQuery's extend. Focus on places where input from query parameters, JSON bodies, or XML is passed into these functions.
Seen in 5 reports
-
When testing a merge or extend helper, feed a nested key named for the prototype and check whether a property appears on all plain objects afterwards. For path-setting helpers, pass a path whose first segment names the prototype and see whether the assignment lands on the shared prototype. Always verify the effect on the prototype itself, not just on the returned object.
Seen in 4 reports
-
Review recursive merge and dynamic assignment code for missing checks on special key names. Manual code review of merge and assignment logic in server code is a reliable way to find these issues, especially in Ruby applications that recursively merge user-supplied JSON into object attributes.
Seen in 3 reports
-
Look for gadgets that can escalate prototype pollution to code execution. For example, pollute a property that EJS reads during rendering, or a property used in an authorisation check, and see whether it reaches code execution or grants access. The evidence includes chaining server-side pollution into code execution without relying on the filesystem.
Seen in 3 reports
-
Test XML parsing libraries by sending XML with element or attribute names aimed at the prototype and checking the parsed object's prototype. Libraries such as fast-xml-parser and xml2js build objects from parsed input and may be vulnerable if they do not filter special keys.
Seen in 2 reports
-
Be careful about scope and impact. Reporting a prototype pollution in a library that is not reachable from user input, or without demonstrating a concrete effect, is a common mistake. Show impact by chaining to a sink or demonstrating observable behaviour change, and make sure the affected component is in scope for the program.
-
For server-side targets, detect pollution through observable side effects rather than crashing the process. Look for changed responses or behaviour after a crafted request, and avoid denial-of-service style tests that could disrupt the service. The evidence includes detection without denial of service as a specific technique.
Seen in 1 report
-
On the client side, look for a sink that reads a property from the prototype and turns it into markup or script, then pollute that property through a query or fragment parameter. Check whether the pollution survives a reload or navigation, for example through stored state, and whether it can be re-triggered later. This can turn prototype pollution into DOM XSS.
-
Check whether an old AngularJS build is loaded in production and whether its merge helpers can be reached from user input. Outdated AngularJS in production bundles is a known source of prototype pollution issues.
Seen in 1 report
-
For telemetry collectors and similar features, try indexing a document whose field names target the prototype, then wait for collection or restart the service to trigger it. In Kibana's upgrade assistant telemetry collector, a dangerous nested-property setter was used on telemetry document fields.
Seen in 1 report
-
$10,000 Critical
-
-
For anomaly detection features, write a crafted influencer field name into an anomaly index, import a detection rule that uses it, enable the rule and wait for evaluation. In Kibana's SIEM signal feature, attacker-controlled field names were merged without blocking special keys and the polluted value was later evaluated as code.
Seen in 1 report
-
$5,000 Critical
-
-
For diagram features, add a Mermaid diagram with a directive that sets a prototype-named key in an issue, save it and open the issue to see whether the page breaks. In GitLab, the directive JSON was merged into config without sanitisation.
Seen in 1 report
-
Do not rely only on automated scanners; manually verify suspected pollution points that tools miss. The evidence explicitly notes that manual verification is needed for points scanners miss.
Seen in 1 report
-
Trace a prototype pollution in a popular package down to applications that depend on it and check whether user input reaches the vulnerable merge. Widely downloaded npm packages used as transitive dependencies can affect many applications, but you need to show a realistic path from input to the vulnerable code.