[Issue]: User/Pass sent in cleartext #5186

Closed
opened 2026-02-07 01:32:50 +03:00 by OVERLORD · 5 comments
Owner

Originally created by @CaryRoys on GitHub (Oct 26, 2023).

User/Pass sent in cleartext during login

Security best practices dictate that a cleartext password should never be sent over the wire, but instead a password hash which is validated against a hash of the password stored in the database.

Steps to reproduce:

  1. Open JellyFin in a browser
  2. Go into Developer mode
  3. Log on with username and password
  4. Check the entry for /Users/authenticatebyname, under "Network" and the "Payload" of the request being sent.

You will see a JSON blob like so:

{Username: "username", Pw: "password"}

What is strange is, the password appears to be stored hashed in the database. The remediation for this is to generate the hash client-side and send that across the wire. Some remediation can be accomplished by using HTTPS, but this is still vulnerable to a MITM attack.

I do not know if the same issue is present in any of the client applications (yet). Will investigate and update.

Jellyfin Version

10.8.9

if other:

No response

Environment

- OS: Windows
- Linux Kernel:
- Virtualization:
- Clients: Browser
- Browser: Brave
- FFmpeg Version: 
- Playback Method: 
- Hardware Acceleration: 
- GPU Model: none
- Plugins: default
- Reverse Proxy: none
- Base URL: http://192.168.2.155:8096
- Networking: 1x gigabit adapter
- Storage: 2x 14tb mirrored SATA drives

Jellyfin logs

No response

FFmpeg logs

No response

Please attach any browser or client logs here

No response

Please attach any screenshots here

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
Originally created by @CaryRoys on GitHub (Oct 26, 2023). ### User/Pass sent in cleartext during login Security best practices dictate that a cleartext password should never be sent over the wire, but instead a password hash which is validated against a hash of the password stored in the database. Steps to reproduce: 1. Open JellyFin in a browser 2. Go into Developer mode 3. Log on with username and password 4. Check the entry for /Users/authenticatebyname, under "Network" and the "Payload" of the request being sent. You will see a JSON blob like so: {Username: "username", Pw: "password"} What is strange is, the password appears to be stored hashed in the database. The remediation for this is to generate the hash client-side and send that across the wire. Some remediation can be accomplished by using HTTPS, but this is still vulnerable to a MITM attack. I do not know if the same issue is present in any of the client applications (yet). Will investigate and update. ### Jellyfin Version 10.8.9 ### if other: _No response_ ### Environment ```markdown - OS: Windows - Linux Kernel: - Virtualization: - Clients: Browser - Browser: Brave - FFmpeg Version: - Playback Method: - Hardware Acceleration: - GPU Model: none - Plugins: default - Reverse Proxy: none - Base URL: http://192.168.2.155:8096 - Networking: 1x gigabit adapter - Storage: 2x 14tb mirrored SATA drives ``` ### Jellyfin logs _No response_ ### FFmpeg logs _No response_ ### Please attach any browser or client logs here _No response_ ### Please attach any screenshots here _No response_ ### Code of Conduct - [X] I agree to follow this project's Code of Conduct
OVERLORD added the bug label 2026-02-07 01:32:50 +03:00
Author
Owner

@cvium commented on GitHub (Oct 26, 2023):

So you're saying the OAuth2 spec is insecure? Hopefully, whoever exposes their server to the public are smart enough to use TLS.

Security best practices dictate that a cleartext password should never be sent over the wire, but instead a password hash which is validated against a hash of the password stored in the database.

Nonsensical. Now the hashed password is the password, which you're sending in plain text over the wire.

@cvium commented on GitHub (Oct 26, 2023): So you're saying the OAuth2 spec is insecure? Hopefully, whoever exposes their server to the public are smart enough to use TLS. > Security best practices dictate that a cleartext password should never be sent over the wire, but instead a password hash which is validated against a hash of the password stored in the database. Nonsensical. Now the hashed password _is_ the password, which you're sending in plain text over the wire.
Author
Owner

@CaryRoys commented on GitHub (Oct 26, 2023):

To your point @cvium, the OAuth2 spec has this to say:

https://www.rfc-editor.org/rfc/rfc6749#section-1.3.3

The authorization server MUST require the use of TLS as described in when sending requests using password authentication.

https://www.rfc-editor.org/rfc/rfc6749#section-2.3.1

Clients in possession of a client password MAY use the HTTP Basic
authentication scheme as defined in [RFC2617] to authenticate with
the authorization server.

If we're going by the letter of the RFC, then the answer instead of sending the hash would be to refuse to function in non-TLS mode. I think that's no good for most users, who are likely using it locally.

@CaryRoys commented on GitHub (Oct 26, 2023): To your point @cvium, the OAuth2 spec has this to say: https://www.rfc-editor.org/rfc/rfc6749#section-1.3.3 The authorization server MUST require the use of TLS as described in when sending requests using password authentication. https://www.rfc-editor.org/rfc/rfc6749#section-2.3.1 Clients in possession of a client password MAY use the HTTP Basic authentication scheme as defined in [[RFC2617](https://www.rfc-editor.org/rfc/rfc2617)] to authenticate with the authorization server. If we're going by the letter of the RFC, then the answer instead of sending the hash would be to refuse to function in non-TLS mode. I think that's no good for most users, who are likely using it locally.
Author
Owner

@CaryRoys commented on GitHub (Oct 26, 2023):

Nonsensical. Now the hashed password is the password, which you're sending in plain text over the wire.

At least that hash can't easily be used elsewhere. Password security is not just about securing the one system, it's about not leaking credentials which might be re-used elsewhere.

@CaryRoys commented on GitHub (Oct 26, 2023): _Nonsensical. Now the hashed password is the password, which you're sending in plain text over the wire._ At least that hash can't easily be used elsewhere. Password security is not just about securing the one system, it's about not leaking credentials which might be re-used elsewhere.
Author
Owner

@cvium commented on GitHub (Oct 26, 2023):

If someone wants to be stupid, we can't stop them. Our recommendation is to use a reverse proxy, which handles the TLS termination, so Jellyfin cannot determine whether the connection is secure. It is up to the server admin to make it so.

We will not add password hashing on the client side. If someone reuses their password, they are likely to have it leaked elsewhere.

@cvium commented on GitHub (Oct 26, 2023): If someone wants to be stupid, we can't stop them. Our recommendation is to use a reverse proxy, which handles the TLS termination, so Jellyfin cannot determine whether the connection is secure. It is up to the server admin to make it so. We will not add password hashing on the client side. If someone reuses their password, they are likely to have it leaked elsewhere.
Author
Owner

@oddstr13 commented on GitHub (Oct 26, 2023):

Pre-hashed passwords where a part of Emby back when we forked (no idea if it still is), as a security by obscurity measure.
It was removed in Jellyfin 10.3 back in 2019, you can see some of the discussion following the removal in #1222.

It doesn't actually provide any additional security, as if you can read passwords, you can also most likely manipulate the sent/received data.

Re-use of passwords is a big no-no in any case, as there are still very many services out there not properly hashing and salting their password databases. Many are actually encrypting the database, as opposed to hashing, and others are still using md5/sha1, which are trivially reversed with rainbow tables or easily brute-forced using the GPU of any somewhat modern gaming PC.

If you are exposing Jellyfin, or any other service, to the internet, you must use https to avoid the many different forms of MITM attacks that exists.

@oddstr13 commented on GitHub (Oct 26, 2023): Pre-hashed passwords where a part of Emby back when we forked (no idea if it still is), as a security by obscurity measure. It was removed in Jellyfin 10.3 back in 2019, you can see some of the discussion following the removal in #1222. It doesn't actually provide any additional security, as if you can read passwords, you can also most likely manipulate the sent/received data. Re-use of passwords is a big no-no in any case, as there are still very many services out there not properly hashing and salting their password databases. Many are actually encrypting the database, as opposed to hashing, and others are still using md5/sha1, which are trivially reversed with rainbow tables or easily brute-forced using the GPU of any somewhat modern gaming PC. If you are exposing Jellyfin, or any other service, to the internet, you *must* use https to avoid the many different forms of MITM attacks that exists.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/jellyfin#5186