Skip to content
RCE Write-up Intermediate

Exploit Lab: WPQuery (CVE-2024–50498)

The WordPress plugin WP Query Console (version 1.0 and below) contains an unauthenticated remote code execution vulnerability due to a REST API endpoint that lacks authentication and uses the PHP eval() function dangerously. An attacker could execute arbitrary code on the server without logging in.

josh.beck2006 Follow

Published on medium.com

Everything runs in a Docker container, providing a safe, repeatable environment for students to break things — and then fix them.

Josh Beck, on medium.com

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 write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the plugin exposes a REST API endpoint without authentication and passes user input to PHP's eval() function, allowing arbitrary code execution.

Impact

An attacker could execute arbitrary code on the server, potentially taking full control of the WordPress site.

What the attacker needed

WordPress with WP Query Console plugin v1.0 or below; No authentication required

The fix

The vulnerability should be fixed by adding authentication to the REST API endpoint and removing the use of eval() on user input; as of the text, it has not been fixed by the developers.

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 write-up has not been written yet. The Original tab links to the source.

This is a security flaw in a WordPress plugin that lets anyone run harmful commands on a website without needing to log in. The plugin has a feature that runs code from the internet without checking who is asking, which is like leaving your front door wide open.

What is RCE?

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

More by josh.beck2006

View all

2 more disclosed reports, best first.

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.