[GH-ISSUE #12611] issue: Signins with passwords that are longer than 71 characters work even when they are trimmed to that length #32186

Closed
opened 2026-04-25 06:04:25 -05:00 by GiteaMirror · 3 comments
Owner

Originally created by @mrakgr on GitHub (Apr 8, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/12611

Check Existing Issues

  • I have searched the existing issues and discussions.
  • I am using the latest version of Open WebUI.

Installation Method

Docker

Open WebUI Version

0.6.2

Ollama Version (if applicable)

No response

Operating System

Windows 11

Browser (if applicable)

No response

Confirmation

  • I have read and followed all instructions in README.md.
  • I am using the latest version of both Open WebUI and Ollama.
  • I have included the browser console logs.
  • I have included the Docker container logs.
  • I have listed steps to reproduce the bug in detail.

Expected Behavior

That only the original password would provide access to the account.

Actual Behavior

Any password which matches the first 71 characters of the password will be allowed.

Steps to Reproduce

Create an account with a large password, greater than 72 characters. Try logging in with the end of it trimmed.

Logs & Screenshots

When I execute the signin endpoint using the actual password, it works.

Image

Image

When I remove a few letters from the end of the password....

Image

Image

It also works. I have to remove quite a bit of the password before it triggers an error....

Image

Image

Image

Image

I'd consider this a major security vulnerability, but I am guessing most users will have passwords less than 72 characters long. Good thing I realized this before going forward with using the API keys as user passwords.

Additional Information

There's nothing interesting in the browser or the docker container logs, so I will skip those.

Originally created by @mrakgr on GitHub (Apr 8, 2025). Original GitHub issue: https://github.com/open-webui/open-webui/issues/12611 ### Check Existing Issues - [x] I have searched the existing issues and discussions. - [x] I am using the latest version of Open WebUI. ### Installation Method Docker ### Open WebUI Version 0.6.2 ### Ollama Version (if applicable) _No response_ ### Operating System Windows 11 ### Browser (if applicable) _No response_ ### Confirmation - [x] I have read and followed all instructions in `README.md`. - [x] I am using the latest version of **both** Open WebUI and Ollama. - [x] I have included the browser console logs. - [x] I have included the Docker container logs. - [x] I have listed steps to reproduce the bug in detail. ### Expected Behavior That only the original password would provide access to the account. ### Actual Behavior Any password which matches the first 71 characters of the password will be allowed. ### Steps to Reproduce Create an account with a large password, greater than 72 characters. Try logging in with the end of it trimmed. ### Logs & Screenshots When I execute the signin endpoint using the actual password, it works. ![Image](https://github.com/user-attachments/assets/c9b8401a-8c45-4961-9b5b-a2189b76d003) ![Image](https://github.com/user-attachments/assets/c280a297-588c-4612-9641-c54cd25ae3fe) When I remove a few letters from the end of the password.... ![Image](https://github.com/user-attachments/assets/68bdaaa7-d98d-4365-8b8f-445b72baccf4) ![Image](https://github.com/user-attachments/assets/a78b0d07-1758-4c85-a883-223756a77215) It also works. I have to remove quite a bit of the password before it triggers an error.... ![Image](https://github.com/user-attachments/assets/e4e26ea3-f082-49fb-9a70-5727fc62c8cd) ![Image](https://github.com/user-attachments/assets/d37d9a6d-8bcb-41e2-a96a-7b50326aae84) ![Image](https://github.com/user-attachments/assets/bc6c516e-48a2-4417-9845-e3236e2efe4b) ![Image](https://github.com/user-attachments/assets/a660645d-4431-4aea-8483-49a08d1d239e) I'd consider this a major security vulnerability, but I am guessing most users will have passwords less than 72 characters long. Good thing I realized this before going forward with using the API keys as user passwords. ### Additional Information There's nothing interesting in the browser or the docker container logs, so I will skip those.
GiteaMirror added the bug label 2026-04-25 06:04:25 -05:00
Author
Owner

@mrakgr commented on GitHub (Apr 8, 2025):

I'll change my approach and hash the email in order to derive the password instead.

<!-- gh-comment-id:2787009065 --> @mrakgr commented on GitHub (Apr 8, 2025): I'll change my approach and hash the email in order to derive the password instead.
Author
Owner

@tjbck commented on GitHub (Apr 8, 2025):

Bcrypt has a maximum input length of 72 bytes for the password (not characters, but bytes). Any bytes beyond that will be ignored silently.

<!-- gh-comment-id:2787499925 --> @tjbck commented on GitHub (Apr 8, 2025): Bcrypt has a maximum input length of 72 bytes for the password (not characters, but bytes). Any bytes beyond that will be ignored silently.
Author
Owner

@tjbck commented on GitHub (Apr 8, 2025):

60d11c1f6f

<!-- gh-comment-id:2787509258 --> @tjbck commented on GitHub (Apr 8, 2025): 60d11c1f6f2982209f89083c3e2a2c471587bdfb
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#32186