Unauthorized access to icons #5938

Closed
opened 2026-03-07 20:43:02 -06:00 by GiteaMirror · 6 comments
Owner

Originally created by @showhwa on GitHub (Jun 25, 2025).

Vaultwarden Support String

Unrelated

Vaultwarden Build Version

Vaultwarden 1.34.1 Web-Vault 2025.5.0

Deployment method

Official Container Image

Custom deployment method

Unrelated

Reverse Proxy

nginx version: nginx/1.22.1 from apt-get

Host/Server Operating System

Linux

Operating System Version

Unrelated

Clients

Web Vault

Client Version

Unrelated

Steps To Reproduce

  1. Open any incognito tab
  2. Open https://{domain}/icons/Github.com/icon.png or https://{domain}/icons/google.com/icon.png
  3. enter

Expected Result

401: Unauthorized

Actual Result

show icons

Logs


Screenshots or Videos

Image

Additional Context

https://{domain}/icons/google.com/icon.png
https://{domain}/icons/youtube.com/icon.png
https://{domain}/icons/Github.com/icon.png
https://{domain}/icons/github.com/icon.png
https://{domain}/icons/{site-domain}/icon.png

Originally created by @showhwa on GitHub (Jun 25, 2025). ### Vaultwarden Support String Unrelated ### Vaultwarden Build Version Vaultwarden 1.34.1 Web-Vault 2025.5.0 ### Deployment method Official Container Image ### Custom deployment method Unrelated ### Reverse Proxy nginx version: nginx/1.22.1 from apt-get ### Host/Server Operating System Linux ### Operating System Version Unrelated ### Clients Web Vault ### Client Version Unrelated ### Steps To Reproduce 1. Open any incognito tab 2. Open https://{domain}/icons/Github.com/icon.png or https://{domain}/icons/google.com/icon.png 3. enter ### Expected Result 401: Unauthorized ### Actual Result show icons ### Logs ```text ``` ### Screenshots or Videos ![Image](https://github.com/user-attachments/assets/6ecfab93-a098-47d3-81e1-66156a1d4c45) ### Additional Context https://{domain}/icons/google.com/icon.png https://{domain}/icons/youtube.com/icon.png https://{domain}/icons/Github.com/icon.png https://{domain}/icons/github.com/icon.png https://{domain}/icons/{site-domain}/icon.png
GiteaMirror added the bug label 2026-03-07 20:43:02 -06:00
Author
Owner

@showhwa commented on GitHub (Jun 25, 2025):

I tried the official version and it is accessible,
https://icons.bitwarden.eu/github.com/icon.png
https://icons.bitwarden.net/github.com/icon.png

But the official version is public and multi-user, and does not have as much privacy as personal disclosure.
So should the self-hosted vault close icons and use the official icons server?

@showhwa commented on GitHub (Jun 25, 2025): I tried the official version and it is accessible, https://icons.bitwarden.eu/github.com/icon.png https://icons.bitwarden.net/github.com/icon.png But the official version is public and multi-user, and does not have as much privacy as personal disclosure. So should the self-hosted vault close icons and use the official icons server?
Author
Owner

@dani-garcia commented on GitHub (Jun 25, 2025):

That is by design, and we can't really do access control of this endpoint as the clients don't send Authorization headers for this call.

The only two alternatives are disabling the icon downloads altogether:
9059437c35/.env.template (L239)

Or updating Vaultwarden to use an external service, which will redirect all requests to an external service. The negative that now that service will know which sites are part of your vault:
9059437c35/.env.template (L325)

ICON_SERVICE=https://icons.bitwarden.net/{}/icon.png
# or
ICON_SERVICE=https://www.google.com/s2/favicons?domain={}&sz=256
@dani-garcia commented on GitHub (Jun 25, 2025): That is by design, and we can't really do access control of this endpoint as the clients don't send `Authorization` headers for this call. The only two alternatives are disabling the icon downloads altogether: https://github.com/dani-garcia/vaultwarden/blob/9059437c35e35ab8eb7d1d4716bf13eec0a4ee64/.env.template#L239 Or updating Vaultwarden to use an external service, which will redirect all requests to an external service. The negative that now that service will know which sites are part of your vault: https://github.com/dani-garcia/vaultwarden/blob/9059437c35e35ab8eb7d1d4716bf13eec0a4ee64/.env.template#L325 ```env ICON_SERVICE=https://icons.bitwarden.net/{}/icon.png # or ICON_SERVICE=https://www.google.com/s2/favicons?domain={}&sz=256 ```
Author
Owner

@showhwa commented on GitHub (Jun 25, 2025):

@dani-garcia, thanks for the solution.
At first I thought that the icon server of the self-hosted password vault only provided the websites saved in the password vault. But when I tried to access the website that was not saved in the password vault, it also displayed it. I understood its principle (downloading icons according to the URL).
Instead of letting the icon server know the websites we saved, it is better to continue using the default method or duckduckgo, lol.
Finally, thank you again for letting me understand this knowledge.

@showhwa commented on GitHub (Jun 25, 2025): @dani-garcia, thanks for the solution. At first I thought that the icon server of the self-hosted password vault only provided the websites saved in the password vault. But when I tried to access the website that was not saved in the password vault, it also displayed it. I understood its principle (downloading icons according to the URL). Instead of letting the icon server know the websites we saved, it is better to continue using the default method or duckduckgo, lol. Finally, thank you again for letting me understand this knowledge.
Author
Owner

@BlackDex commented on GitHub (Jun 25, 2025):

Vaultwarden can't read the stored vault items in the database, and thus also doesn't know which domains are configured.
It only knows the domains when an icon request is made.

There maybe are some ways to put some session checking on the icons by some reverse proxies? Like only allow an IP access to that endpoint when a /sync request was done within a specific amount of time and only allow that IP or so?

The problem will be with roaming IP's of course, then suddenly a different IP which might still be valid doesn't have access anymore.

@BlackDex commented on GitHub (Jun 25, 2025): Vaultwarden can't read the stored vault items in the database, and thus also doesn't know which domains are configured. It only knows the domains when an icon request is made. There maybe are some ways to put some session checking on the icons by some reverse proxies? Like only allow an IP access to that endpoint when a `/sync` request was done within a specific amount of time and only allow that IP or so? The problem will be with roaming IP's of course, then suddenly a different IP which might still be valid doesn't have access anymore.
Author
Owner

@showhwa commented on GitHub (Jun 25, 2025):

@BlackDex , As you said, after each /sync or other authenticated request, set a whitelist for the current IPs and directly block requests from other IPs.
Icons are also requested when scrolling lists, searching, creating, logging in, etc., so it is best not to limit access time.

=========
Can the default Rocket 40X interface be replaced with Nginx's 40X interface?
This may increase the security of the Vaultwarden entrance.
Image

@showhwa commented on GitHub (Jun 25, 2025): @BlackDex , As you said, after each `/sync` or other `authenticated` request, set a whitelist for the current IPs and directly block requests from other IPs. Icons are also requested when scrolling lists, searching, creating, logging in, etc., so it is best not to limit access time. ========= Can the default Rocket 40X interface be replaced with Nginx's 40X interface? This may increase the security of the Vaultwarden entrance. ![Image](https://github.com/user-attachments/assets/0c830f5f-9fbc-43ea-878f-1bebb912cbc5)
Author
Owner

@BlackDex commented on GitHub (Jun 25, 2025):

Not really, and that will only be security by obscurity, and hackers know that anyway.

@BlackDex commented on GitHub (Jun 25, 2025): Not really, and that will only be security by obscurity, and hackers know that anyway.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/vaultwarden#5938