Parse Server _expandResultOnKeyPath Prototype Pollution Remote Code Execution Vulnerability
The _expandResultOnKeyPath function in Parse Server allows modification of object prototype attributes, enabling prototype pollution. An authenticated attacker could exploit this to execute arbitrary code in the context of the service account.
Originally disclosed on Zero Day Initiative
This vulnerability allows remote attackers to execute arbitrary code on affected installations of Parse Server. Authentication is required to exploit this vulnerability.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely, the _expandResultOnKeyPath function fails to sanitise user-controlled keys, allowing an attacker to modify object prototype attributes.
Impact
An authenticated attacker could execute arbitrary code with the privileges of the service account.
What the attacker needed
Authentication required
The fix
Parse has issued an update to correct this vulnerability.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
Prototype pollution is a flaw where an attacker can add or change properties on a base object that many other objects inherit from, potentially altering how the whole application behaves. Here, a function in Parse Server did not properly guard against such changes, and because the attacker must be logged in, they could use this to run their own code on the server.
What is Prototype pollution?
Input changes JavaScript's shared object prototype, altering behaviour across the application, sometimes to XSS or code execution.