WordPress this week addressed a vulnerability that could allow an unauthenticated attacker to execute code remotely and take over vulnerable websites.
The vulnerability impacts the manner in which comments are filtered and then stored in the database, and any WordPress installation prior to version 5.1.1 with comments enabled is vulnerable.
To exploit the vulnerability, an attacker would have to trick the site administrator to visit a domain to trigger a cross-site request forgery (CSRF) exploit in the background. The exploit leverages a series of logic flaws and sanitization errors to execute code and take over the target site, Simon Scannell of RIPS Technologies explains.
The vulnerability is exploitable with default settings and, with most WordPress installations having comments enabled, millions of websites are likely impacted, the security researcher says.
The core of the problem, Scannell explains, is that WordPress doesn’t perform CSRF validation when a user posts a new comment (features such as trackbacks and pingbacks would break if validations were in place), which allows an attacker to create comments in the name of administrators.
Given that administrators are allowed to use arbitrary HTML tags in comments, even