CVE-2026-6127 Elementor Website Builder <= 4.0.4 - Authenticated (Contributor+) Stored Cross-Site Scripting via REST API

Medium 6.4 Published Updated

Authenticated contributors can inject arbitrary scripts via REST API due to missing sanitization, leading to stored XSS execution for other users.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Over the internet
Victim action needed
Not needed
Fix
None listed

What is CVE-2026-6127?

CVE-2026-6127 is a medium-severity cross-site scripting vulnerability in elemntor Elementor Website Builder – more than just a page builder, published on 1 May 2026. Any signed-in user can exploit it over the network, with no action from the victim.

Official description

The Elementor Website Builder plugin for WordPress is vulnerable to Stored Cross-Site Scripting via the _elementor_data meta field in versions up to, and including, 4.0.4. This is due to insufficient input sanitization when processing form-encoded REST API requests. The plugin registers the _elementor_data meta field with show_in_rest but omits a sanitize_callback, relying instead on a rest_pre_insert_post filter (sanitize_post_data function) that only sanitizes JSON-encoded request bodies. When a contributor sends a form-encoded PATCH request to the WordPress REST API, the json_decode() call on the raw body returns null, causing all sanitization to be skipped. The unsanitized data is then stored via update_post_meta() and later output without escaping through multiple widget sinks including the HTML widget's print_unescaped_setting() function. This makes it possible for authenticated attackers, with contributor-level access and above, to inject arbitrary web scripts in pages that will execute whenever a user accesses an injected page.

Weakness: CWE-79

Which versions are affected by CVE-2026-6127?

How do I fix CVE-2026-6127?

No fix has been published for CVE-2026-6127 yet. Limit exposure of the affected software until one is available.

Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.

Is CVE-2026-6127 being exploited?

There is no known exploitation of CVE-2026-6127 in the wild and no public exploit code.

Sources

Also known as GHSA-4w32-4c6r-m74m.

Is CVE-2026-6127 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free