CVE-2019-9787 Cross-site scripting in n/a

High 8.8 Published Updated

Unauthenticated attackers can exploit XSS to gain admin access and execute arbitrary code via PHP file modification in WordPress.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2019-9787?

CVE-2019-9787 is a high-severity cross-site scripting vulnerability in Wordpress Wordpress, published on 14 Mar 2019. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

Official description

WordPress before 5.1.1 does not properly filter comment content, leading to Remote Code Execution by unauthenticated users in a default configuration. This occurs because CSRF protection is mishandled, and because Search Engine Optimization of A elements is performed incorrectly, leading to XSS. The XSS results in administrative access, which allows arbitrary changes to .php files. This is related to wp-admin/includes/ajax-actions.php and wp-includes/comment.php.

Weakness: CWE-352

Which versions are affected by CVE-2019-9787?

It affects 1 product.

Products include Wordpress Wordpress.

How do I fix CVE-2019-9787?

Upgrade to a fixed version.

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-2019-9787 being exploited?

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

Public exploit code: 6 proofs of concept on GitHub.

All Wordpress Wordpress vulnerabilities

Sources

Also known as DEBIAN-CVE-2019-9787, GHSA-vqp9-3cmr-vgcc, UBUNTU-CVE-2019-9787.

Is CVE-2019-9787 in your software?

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

Check your SBOMs for free