WordPress announced a security update to fix two vulnerabilities that could provide an attacker with the opportunity to stage a full site takeover. Among the two vulnerabilities, the most serious one involves a stored cross site scripting (Stored XSS) vulnerability.
WordPress Stored Cross Site Scripting (XSS) Vulnerability
The WordPress XSS vulnerability was discovered by the WordPress security team within the core WordPress files.
A stored XSS vulnerability is one in which an attacker is able to upload a script directly to the WordPress website.
The locations of these kinds of vulnerabilities are generally anywhere that the WordPress site allows input, like submitting a post or a contact form.
According to Wordfence, the affected WordPress files did perform sanitization in order to prohibit the upload of malicious files.
But the order in which the sanitization happened set up a situation where the sanitization could be bypassed.
Wordfence offered this insight into the patch that fixes this vulnerability:
“The patched version runs wp_filter_global_styles_post before wp_filter_post_kses so that any potential bypasses have already been processed and wp_kses can effectively sanitize them.”
The reason an attacker can upload a script is often because of a bug in how a file was coded.
A backdoor is a file/code that allows a hacker to access the backend of a WordPress site at will with complete access.
Prototype Pollution Vulnerability
This second issue is actually two problems that are both Prototype Pollution Vulnerabilities.
One is a Prototype Pollution Vulnerability discovered in the Gutenberg wordpress/url package. This is a module within WordPress that allows a WordPress website to manipulate URLs.
For example, this Gutenberg wordpress/url package provides various functionalities for query strings and performs clean up on the URL slug to do things like convert uppercase letters to lowercase.
The second one is a Prototype Pollution vulnerability in jQuery. This vulnerability is fixed in jQuery 2.2.3.
Wordfence states that they are not aware of any exploits of this vulnerability and states that the complexity of exploiting this specific vulnerability makes it unlikely to be an issue.
The Wordfence vulnerability analysis concluded:
How Bad is the WordPress Stored XSS Vulnerability?
This particular vulnerability requires a user with contributor level access in order to have the necessary permission level to upload a malicious script.
So there is an extra step needed in the form of first having to acquire a contributor level login credential in order to proceed to the next step of exploiting the stored XSS vulnerability.
While the extra step could make the vulnerability harder to exploit, all that stands between relative safety and a full site takeover is the strength and complexity of contributor passwords.
Update to WordPress 5.9.2
The latest version of WordPress, 5.9.2, fixes two security related issues and addresses and patches one bug that could result in an error message for sites using the Twenty Twenty Two theme.
A WordPress tracking ticket explains the bug like this:
“Having an older default theme activated and then clicking to preview Twenty Twenty Two gave me an error screen with a grey background with a white notification box saying “The theme you are currently using is not compatible with Full Site Editing.””
The official WordPress announcement recommends that all publishers update their installation to WordPress version 5.9.2.
Some sites may have automatic updates enabled and the sites are currently protected.
But that’s not the case for all sites because many sites require someone with an administrator level access to approve the update and set it in motion.
So it may be prudent to log in to your website and check to confirm if it is currently using version 5.9.2.
If the website is not using version 5.9.2, then the next steps to consider are backing up the website itself and then updating to the latest versions.
That said, some will add an additional layer of safety by first updating a copy of the site on a staging server and reviewing the updated test version to make sure there are no conflicts with currently installed plugins and themes.
Typically, after an important update to WordPress, plugins and themes may publish updates in order to fix issues.
Nevertheless, WordPress recommends updating as soon as possible.