Skip to content
Prototype pollution Advisory Advanced CVE-2022-41879

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.

Mikhail Shcherbakov Follow

Originally disclosed on Zero Day Initiative

High 7.2 View original

This vulnerability allows remote attackers to execute arbitrary code on affected installations of Parse Server. Authentication is required to exploit this vulnerability.

Mikhail Shcherbakov, Cristian-Alexandru Staicu and Musard Balliu, on the Zero Day Initiative

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.

More by Mikhail Shcherbakov

View all

1 more disclosed report, best first.

More from Zero Day Initiative

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Prototype pollution

The lesson behind this report.

Input changes JavaScript's shared object prototype, altering behaviour across the application, sometimes to XSS or code execution.