CVE-2024-6307 WordPress Core < 6.5.5 - Authenticated (Contributor+) Stored Cross-Site Scripting via HTML API

Medium 6.4 Published Updated

Authenticated contributors can inject arbitrary scripts via the HTML API, leading to code execution or account takeover when pages are viewed.

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

What is CVE-2024-6307?

CVE-2024-6307 is a medium-severity cross-site scripting vulnerability in WordPress, published on 25 Jun 2024. Any signed-in user can exploit it over the network, with no action from the victim.

Official description

WordPress Core is vulnerable to Stored Cross-Site Scripting via the HTML API in various versions prior to 6.5.5 due to insufficient input sanitization and output escaping on URLs. 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.

Which versions are affected by CVE-2024-6307?

2 open source packages ship an affected version, including wordpress and wordpress-multisite.

PackageAffectedFixed in
wordpress BitnamiFrom 5.9.05.9.10, 6.0.9, 6.1.7, 6.2.5, 6.3.5, 6.4.5, 6.5.5
wordpress-multisite BitnamiFrom 5.9.05.9.10, 6.0.9, 6.1.7, 6.2.5, 6.3.5, 6.4.5, 6.5.5

How do I fix CVE-2024-6307?

Upgrade wordpress to a fixed version for your release line: 5.9.10, 6.0.9, 6.1.7 or 6.2.5.

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-2024-6307 being exploited?

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

Sources

Also known as BIT-wordpress-2024-6307, BIT-wordpress-multisite-2024-6307, DEBIAN-CVE-2024-6307, GHSA-2f47-vffr-pwwf, UBUNTU-CVE-2024-6307.

Is CVE-2024-6307 in your software?

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

Check your SBOMs for free