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

Not escaping directory names leading to XSS risk #6451

Open
anthonyryan1 opened this issue Jan 16, 2025 · 0 comments
Open

Not escaping directory names leading to XSS risk #6451

anthonyryan1 opened this issue Jan 16, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@anthonyryan1
Copy link

Describe The Bug
Within the #/wizardlibrary.html template page, we are not currently escaping the directory name, and it can lead to XSS problems.

I'm reporting this publicly, rather than to the security email because there's very little risk in my opinion. With the wizard page being used only on new setups, and Jellyfin and the dashboard libraries page being buried in settings. Also Jellyfin mostly being private use, it's a low priority security bug.

Steps To Reproduce

  1. Create a new folder with with a maliciously crafted name like "><img src=x onerror=alert("Not escape")>"
  2. Start setting up a new Jellyfin instance
  3. When you setup up the media libraries, select that suspiciously named folder as your media directory
  4. Once you save the folder, you will see an alert when returned to the wizardlibrary.html templatepage.

If you continue through the setup, this same XSS will also occur in #/dashboard/libraries

Expected Behavior
The folder name should be rendered as text, rather than HTML. Using either textContent in javascript, or an escaping function if rendered server side.

Logs
N/A

Screenshots
N/A

System (please complete the following information):

  • Platform: All
  • Browser: All
  • Jellyfin Version: 10.10.3

Additional Context
All credit to Fahimhusain Raydurg, who discovered this issue. I'm just reporting it.

@anthonyryan1 anthonyryan1 added the bug Something isn't working label Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant