Lucene search

K
huntrJeffreygaor97D226EA-2CD8-4F4D-9360-AA46C37FDD26
HistoryFeb 23, 2023 - 11:49 p.m.

Cross-Site Scripting (Stored/Persistent) in Categories

2023-02-2323:49:40
jeffreygaor
www.huntr.dev
12
cross-site scripting
stored
validation
output
burp-suite
http request
payload
web application
category
bug bounty

0.001 Low

EPSS

Percentile

23.5%

Description

• The application is vulnerable to Cross-Site Scripting (XSS) attacks. This occurs when web applications do not properly validate user-supplied inputs before including them in dynamic web pages.

• By intercepting the HTTP Request using Burp-suite tool before submitting into the webpage, Jeffrey was able to store special characters and code in the application, which may then be executed by other users.

Payload

<a>xxs link</a>

POC Walkthrough Video Link:

https://drive.google.com/file/d/1Pc9vQTf5v0FyzrlPPfu9v2Grc1vkS64U/view?usp=share_link

Recommendation

• Before using any user-supplied data, validate its format and reject any characters that are not explicitly allowed (i.e. a white-list). This list should be as restrictive as possible.

• Before using any data (stored or user-supplied) to generate web page content, escape all non alpha-numeric characters (i.e. output-validation). This is particularly important when the original source of data is beyond the control of the application. Even if the source of the data isn’t performing input-validation, output-validation will still prevent XSS. This can be done by converting characters to “&#nn;” (ignore the quotes), where “nn” is the hexadecimal ASCII character number.

• You can also limit the size of the category name when creating.

0.001 Low

EPSS

Percentile

23.5%

Related for 97D226EA-2CD8-4F4D-9360-AA46C37FDD26