[GH-ISSUE #729] Attachments can be downloaded without authorisation #495

Closed
opened 2026-03-03 01:29:53 +03:00 by kerem · 4 comments
Owner

Originally created by @ntimo on GitHub (Nov 16, 2019).
Original GitHub issue: https://github.com/dani-garcia/vaultwarden/issues/729

Hello,
Currently the API does not check if the user is authorized to download the encrypted attachment file via /attachments/.

It would be quite nice to have somekind of authentication here. So that it is not possible to download attachments without having a active session. I also noted that vault.bitwarden.com does the same :( .

Best wishes,
Timo

Originally created by @ntimo on GitHub (Nov 16, 2019). Original GitHub issue: https://github.com/dani-garcia/vaultwarden/issues/729 Hello, Currently the API does not check if the user is authorized to download the encrypted attachment file via /attachments/. It would be quite nice to have somekind of authentication here. So that it is not possible to download attachments without having a active session. I also noted that vault.bitwarden.com does the same :( . Best wishes, Timo
kerem closed this issue 2026-03-03 01:29:53 +03:00
Author
Owner

@mprasil commented on GitHub (Nov 17, 2019):

Yeah, unfortunately this is limitation on the Bitwarden side and I'm not sure what we can do about it. I assume the reason why it's implemented that way in the upstream is that they can offload attachment handling to "dumb" http server. (or even something like S3) On the plus side attachments are decrypted client side. So even if someone managed to guess the attachment URL (which is pretty hard with that uuid) they still wouldn't get the contents.

<!-- gh-comment-id:554688667 --> @mprasil commented on GitHub (Nov 17, 2019): Yeah, unfortunately this is limitation on the Bitwarden side and I'm not sure what we can do about it. I assume the reason why it's implemented that way in the upstream is that they can offload attachment handling to "dumb" http server. (or even something like S3) On the plus side attachments are decrypted client side. So even if someone managed to guess the attachment URL (which is pretty hard with that uuid) they still wouldn't get the contents.
Author
Owner

@ntimo commented on GitHub (Nov 17, 2019):

Maybe we could limit by IP address? I think that should work. So if we know that the user has a active session with IP xy then this IP is allowed to download attachments for this user.

<!-- gh-comment-id:554725232 --> @ntimo commented on GitHub (Nov 17, 2019): Maybe we could limit by IP address? I think that should work. So if we know that the user has a active session with IP xy then this IP is allowed to download attachments for this user.
Author
Owner

@mprasil commented on GitHub (Nov 17, 2019):

Not really. The active session is very loose concept. You can have mobile client logging in and then fetch the attachment hours later from completely different network.

<!-- gh-comment-id:554752776 --> @mprasil commented on GitHub (Nov 17, 2019): Not really. The active session is very loose concept. You can have mobile client logging in and then fetch the attachment hours later from completely different network.
Author
Owner

@mprasil commented on GitHub (Nov 27, 2019):

I'm going to close this as it's essentially working as intended. (trying to be upstream compatible)

<!-- gh-comment-id:559059635 --> @mprasil commented on GitHub (Nov 27, 2019): I'm going to close this as it's essentially working as intended. (trying to be upstream compatible)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/vaultwarden#495
No description provided.