Skip to content
CSRF Write-up Intermediate

Cross-Site Request Forgery in Elementor Plugin Affecting 2 Million+ Sites

Elementor versions 4.3.0 and 4.3.1 disabled WordPress's REST API nonce check whenever the request URI contained a specific string, allowing an attacker to craft a link that, when clicked by a logged-in user, performs any REST action the user is permitted to perform. On a default installation, an administrator clicking the link could create a second administrator account.

Dave Jong Follow

Published on patchstack.com

This blog post is about a Cross-Site Request Forgery vulnerability in the Elementor Website Builder plugin. One link, opened by a logged-in WordPress user, make

Dave Jong, on patchstack.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

The plugin checked the raw request URI (including the attacker-controlled query string) for a substring instead of the resolved route, and returned true from the rest_authentication_errors filter, which skipped WordPress's nonce verification.

Impact

An attacker could perform any REST API action the victim is authorised to do, including creating an administrator account, reading site settings, or accessing other plugins' endpoints, but only if the victim clicks the link.

What the attacker needed

Victim is logged in; Victim clicks a link; Elementor 4.3.0 or 4.3.1

The fix

Elementor fixed this in version 4.3.2 by checking the resolved REST route (from $wp->query_vars['rest_route']) with an anchored comparison, instead of the raw request URI.

How it was found

  1. Craft a URL to a REST API endpoint such as /wp-json/wp/v2/users with parameters to create a user and include the string elementor/v1/events/ in the query string.
  2. Send the link to a logged-in administrator (e.g., via email, chat, or comment).
  3. The administrator clicks the link, and the browser sends a GET request with the _method=POST parameter to override the HTTP verb.
  4. The plugin's filter sees the string in the URI and returns true, bypassing the nonce check.
  5. The REST API processes the request as the administrator, creating a new administrator account.

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.

Cross-Site Request Forgery (CSRF) is when a malicious website or link tricks a logged-in user's browser into sending a request the user did not intend. Here, a flaw in a WordPress plugin meant that a simple link could make a logged-in administrator create a new admin account for the attacker, without any JavaScript or form.

What is CSRF?

Another site makes a signed-in user's browser perform an action they did not intend.

More by Dave Jong

View all

2 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Cross-site request forgery (CSRF)

The lesson behind this report.

Another site makes a signed-in user's browser perform an action they did not intend.