mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2025-12-09 09:13:02 +03:00
[Security] Data/config files are insecure in Docker image. Read permission for 'others' by default #1389
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @jsalgado78 on GitHub.
Subject of the issue
Vaultwarden data/config files are insecure. Read permission for 'others' by default
Deployment environment
Docker
Steps to reproduce
Expected behaviour
Data/config files should have permission 0600. Read-write to owner
config.json should be encrypted if it's possible
Actual behaviour
Files like config.json and database are created with permission 0644 by default
config.json contains admin token in plaintext
4 drwxr-xr-x. 3 root root 4096 May 3 11:05 .
8 drwxr-xr-x. 1 root root 4096 May 3 10:04 ..
4 -rw-r--r--. 1 root root 1160 May 3 10:04 config.json
164 -rw-r--r--. 1 root root 167936 May 3 10:04 db.sqlite3
32 -rw-r--r--. 1 root root 32768 May 3 11:05 db.sqlite3-shm
0 -rw-r--r--. 1 root root 0 May 3 11:05 db.sqlite3-wal
4 drwxr-xr-x. 2 root root 4096 May 3 10:04 icon_cache
4 -rw-------. 1 root root 1193 May 3 10:04 rsa_key.der
4 -rw-------. 1 root root 1679 May 3 10:04 rsa_key.pem
4 -rw-r--r--. 1 root root 270 May 3 10:04 rsa_key.pub.der
@BlackDex commented on GitHub:
I'm going to move this to the discussions under
Ideas, also to keep the issues for actual issues to the software.There are also some ways to have the user-id configurable via ENV's like some other docker images of some tools provide.
Not sure if that would be a good thing for this project, but i think we are open for any good written and documented PR regarding this.