Microsoft PowerShell Gallery psg-prod-centralus Uncontrolled Search Path Element Remote Code Execution Vulnerability
The PowerShell Gallery installation from the official Microsoft GitHub repository attempts to load a non-existent cloud resource that is vulnerable to takeover. An attacker can leverage this to execute code on systems dependent on that cloud resource.
Originally disclosed on Zero Day Initiative
This vulnerability allows remote attackers to execute arbitrary code on affected installations of Microsoft PowerShell Gallery. Authentication is not 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
Impact
An attacker could execute arbitrary code on systems that install PowerShell Gallery from the official repository, without authentication.
What the attacker needed
Install PowerShell Gallery from official repo
The fix
Microsoft issued an update to correct the 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.
When you install a program, it sometimes looks for extra files online. Here, the installer looked for a cloud resource that no longer existed, so someone else could claim that resource and put their own malicious files there. Then, when the installer fetched those files, the attacker's code would run on your computer.
What is Subdomain takeover?
A company's DNS still points at a cloud service it no longer uses, so anyone can claim it and serve content on the company's domain.