GHSL-2020-201: Prototype pollution in theia/plugin-ext
The mergeContents and parseConfigurationData functions in theia/plugin-ext do not check for problematic properties like __proto__, allowing an attacker to supply a crafted object that overwrites properties on Object.prototype. This could lead to information disclosure or escalation of privileges if those properties are used for authorization checks.
Originally disclosed on GitHub Security Lab
The package contains a merge function for recursively merging two configuration objects. It does not check for problematic properties like proto, and hence it is vulnerable to prototype pollution.
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
Impact
An attacker could potentially escalate privileges or disclose information if the polluted properties are used in authorization checks, though the report notes uncertainty about whether the target parameter is attacker-controlled in practice.
What the attacker needed
Attacker controls configuration data; IDE imports configuration files automatically
The fix
The fix was merged after being proposed, though the text does not describe the exact change.
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 bug where an attacker can add or change properties on a base object that many other objects inherit from. In JavaScript, most objects share a common prototype, so if an attacker can modify it, their changes appear on almost every object in the program. This can trick the application into thinking a user has admin rights or other privileges they should not have.
What is Prototype pollution?
Input changes JavaScript's shared object prototype, altering behaviour across the application, sometimes to XSS or code execution.