Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reflected XSS Vulnerability in Search Tag #2038

Closed
7a6163 opened this issue Nov 22, 2023 · 3 comments · Fixed by #2039
Closed

Reflected XSS Vulnerability in Search Tag #2038

7a6163 opened this issue Nov 22, 2023 · 3 comments · Fixed by #2039

Comments

@7a6163
Copy link

7a6163 commented Nov 22, 2023

Version v0.12.2

I have identified a Reflected Cross-site Scripting (XSS) vulnerability that could potentially be exploited by attackers to execute malicious code within the context of a user’s web browser.

The vulnerability occurs when unsanitized user input is directly embedded into the HTML output of the search tag functionality without proper encoding or validation. This allows an attacker to craft a specially crafted URL containing malicious JavaScript code, which, when clicked by another user, will be executed within their browser, potentially leading to unauthorized access, session hijacking, or other malicious activities.

Payload:

https://demo.shaarli.org/?searchterm=&searchtags=%3C%2Ftitle%3E%3Csvg%2Fonload%3Dalert%28document.cookie%29%3E++
image

I want to apply for a CVE ID. I’m not sure if it’s possible.

@ArthurHoaro
Copy link
Member

That's a good catch! Thank you for the report.
I'm going to submit a PR to fix this vulnerability. We had a CVE created a few years ago, but I'm unsure what the process is.

ArthurHoaro added a commit to ArthurHoaro/Shaarli that referenced this issue Nov 22, 2023
It affect the title tag of the bookmark list page.
Fixes shaarli#2038
@7a6163
Copy link
Author

7a6163 commented Nov 22, 2023

That's a good catch! Thank you for the report. I'm going to submit a PR to fix this vulnerability. We had a CVE created a few years ago, but I'm unsure what the process is.

@ArthurHoaro I will be reporting the issue to Mitre and requesting a CVE ID. The vulnerability will be referenced, and once the patch is implemented, the CVE will be released. Thank you for the patch.

ArthurHoaro added a commit that referenced this issue Nov 22, 2023
It affect the title tag of the bookmark list page.
Fixes #2038
ArthurHoaro added a commit that referenced this issue Nov 22, 2023
It affect the title tag of the bookmark list page.
Fixes #2038
@ArthurHoaro
Copy link
Member

ArthurHoaro commented Nov 22, 2023

https://demo.shaarli.org has been updated as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants