Skip to content
RCE Advisory Intermediate CVE-2023-35333

MediaWiki PandocUpload Extension Remote Code Execution Vulnerability (CVE-2023-35333)

The PandocUpload extension for MediaWiki did not properly escape shell arguments, so an authenticated user could upload a file whose destination name contained a malicious payload. Successful exploitation could allow the attacker to run arbitrary code on the server.

bawolff Follow

Originally disclosed on Microsoft

High 8.8 View original

FAQ

How could an attacker exploit this vulnerability? An authenticated attacker could exploit this vulnerability by uploading a file with the destination name as a malicious payload due to shell arguments not being properly escaped. When successfully exploited this could allow the malicious actor to perform remote code execution.

FAQ

According to the CVSS metric, the attack vector is network (AV:N), and privilege required is low (PR:L). What is the target used in the context of the remote code execution? The attacker for this vulnerability could target the server accounts in an arbitrary or remote code execution. As an authenticated user, the attacker could attempt to trigger malicious code in the context of the server's account through a network call. The privilege requirement is low because the attacker needs to be authenticated as a normal user.

Microsoft Media-Wiki Extensions

Microsoft Media-Wiki Extensions

Microsoft

Microsoft

Customer Action Required

Yes

The original report as published on the Microsoft Security Response Center, by bawolff. Images and videos are our own copies; raw HTML is shown as text. View it on Microsoft Security Response Center.

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 extension passed the user-controlled upload destination name into a shell command without escaping it, allowing shell metacharacters to be interpreted as commands.

Impact

An authenticated attacker could achieve remote code execution in the context of the server's account, though the text does not state whether any defence limited the exploit.

What the attacker needed

Authenticated as a normal user; ability to upload a file

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.

This is a flaw in a MediaWiki add-on that converts uploaded documents using a command-line tool. When a file is uploaded, its name is passed to a system command, but the name was not made safe first, so special characters in the name could be read as extra commands. That let a logged-in user make the server run their own commands.

What is RCE?

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.

More from Microsoft

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Remote code execution

The lesson behind this report.

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.