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

WebUI Security: Session still valid after reset password but before restart qBittorrent #18443

Open
Ghost-chu opened this issue Jan 23, 2023 · 0 comments · May be fixed by #21304
Open

WebUI Security: Session still valid after reset password but before restart qBittorrent #18443

Ghost-chu opened this issue Jan 23, 2023 · 0 comments · May be fixed by #21304
Labels
Security Related to software vulnerability in qbt (don't overuse this) WebUI WebUI-related issues/changes

Comments

@Ghost-chu
Copy link

qBittorrent & operating system versions

qBittorrent v4.5.0 Web UI (64-bit)
Qt: 6.4.1
Libtorrent: 1.2.18.0
Boost: 1.80.0
OpenSSL: 3.0.7
zlib: 1.2.12.zlib-ng

What is the problem?

qBittorrent does not log off existing sessions when users change their WebUI password (or username), or uncheck the bypass local auth checkbox.

This can be a security risk, as when an attacker logs into the WebUI once, they only need to find a way to keep the operation active, and qBittorrent will extend the session validity for that session.
Even when the user changes the user and password, these sessions are not logged out unless the user restarts qBittorrent.

For Windows hosts, this does not seem to be a problem. But for qBittorrent running on a NAS or Linux server, these devices don't reboot very often, and these users do their best to avoid rebooting qBittorrent to avoid enjoying a slow file checksum.

Also, sessions are not bound to IP addresses.
This means that if the SID is leaked, it can be exploited by an attacker in another location.

Steps to reproduce

  1. Login your qBittorrent in a In-private browser window.
  2. Login your qBittorrent in a normal browser window.
  3. Modify your qBittorrent username and password; Also uncheck Bypass authentication for clients on localhost and Bypass authentication for clients in whitelisted IP subnets to avoid affecting the experimental results.
  4. Click Save to apply password and setting changes.
  5. Re-fresh your In-private browser window, it still keep logged in status.

  1. Check and copy your SID value by press F12, Application -> Cookie -> <YOUR_HOST>
  2. Connect to your remote host, open your qBittorrent instance
  3. In Login page, press F12, Console, and execute javascript:
document.cookie = "SID=<YOUR_SID>"
  1. Press Enter to write cookie value, then re-fresh login page, now you're able continue session in a different machine for full control.
  2. Restart your qBittorrent, now all session are revoked. You're safe now!

Additional context

This report was translated using DeepL, my English is not good, if you have any questions please reply below and I will add them.

Log(s) & preferences file(s)

qBittorrent.conf -> https://paste.gg/p/anonymous/bd4bf3315c8340db8e7ab819ef2a8f90
qBittorrent.log (cutted) -> https://paste.gg/p/anonymous/1cc427f3156f43ffb9c7edfd350b8ce2

NOTE: There is nothing useful in logs, but you can see that there are no multiple times of login.

@thalieht thalieht added Security Related to software vulnerability in qbt (don't overuse this) WebUI WebUI-related issues/changes labels Jan 23, 2023
Func86 added a commit to Func86/qBittorrent that referenced this issue Sep 6, 2024
@Func86 Func86 linked a pull request Sep 6, 2024 that will close this issue
Func86 added a commit to Func86/qBittorrent that referenced this issue Sep 15, 2024
Func86 added a commit to Func86/qBittorrent that referenced this issue Sep 15, 2024
Func86 added a commit to Func86/qBittorrent that referenced this issue Sep 16, 2024
Func86 added a commit to Func86/qBittorrent that referenced this issue Sep 17, 2024
Func86 added a commit to Func86/qBittorrent that referenced this issue Sep 17, 2024
Func86 added a commit to Func86/qBittorrent that referenced this issue Sep 17, 2024
Func86 added a commit to Func86/qBittorrent that referenced this issue Sep 17, 2024
Func86 added a commit to Func86/qBittorrent that referenced this issue Sep 17, 2024
Func86 added a commit to Func86/qBittorrent that referenced this issue Sep 20, 2024
Func86 added a commit to Func86/qBittorrent that referenced this issue Sep 20, 2024
Func86 added a commit to Func86/qBittorrent that referenced this issue Sep 20, 2024
Func86 added a commit to Func86/qBittorrent that referenced this issue Sep 20, 2024
Func86 added a commit to Func86/qBittorrent that referenced this issue Sep 20, 2024
Func86 added a commit to Func86/qBittorrent that referenced this issue Sep 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Security Related to software vulnerability in qbt (don't overuse this) WebUI WebUI-related issues/changes
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants