tag and we can use javascript protocol on the href at...">Bad Sanitization on "vtlib_purify" function leads to XSS - vulnerability database | Vulners.com tag and we can use javascript protocol on the href at..."> tag and we can use javascript protocol on the href at..."> tag and we can use javascript protocol on the href at...">
Lucene search

K
huntrBugraeskiciF0272A31-9944-4545-8428-A26154D20348
HistoryAug 31, 2022 - 3:15 a.m.

Bad Sanitization on "vtlib_purify" function leads to XSS

2022-08-3103:15:07
bugraeskici
www.huntr.dev
10
sanitization
xss
vtlib_purify
javascript
payload
proof of concept
stored xss
bug bounty

0.001 Low

EPSS

Percentile

23.3%

Description

The whole project is using “vtlib_purify” for the sanitization of user inputs. It does a good job while stripping HTML tags like &lt;script&gt; &lt;svg&gt; etc. However, it allows <a> tag and we can use javascript protocol on the href attribute via changing : character to &colon;.
So, our final payload is <a href>click

Proof of Concept

For example, the file “NewReport0” is using “vtlib_purify” for the “reportmodule” parameter and prints the user’s input after sanitization.
We can get the XSS using the payload above.

https://demo.corebos.com/index.php?module=Reports&action=ReportsAjax&file=NewReport0&reportmodule=%3Ca+href=javascript%26colon;alert(document.domain)%3ECLICK%20ME

We can also get stored XSS in comments. Check the https://demo.corebos.com/index.php?module=Accounts&action=DetailView&record=87 , you will see a comment created by me that includes XSS.

0.001 Low

EPSS

Percentile

23.3%

Related for F0272A31-9944-4545-8428-A26154D20348