[GH-ISSUE #5497] Question: why is ADMIN_TOKEN not mandatory #2169

Closed
opened 2026-03-03 02:15:58 +03:00 by kerem · 11 comments
Owner

Originally created by @jflecool2 on GitHub (Jan 29, 2025).
Original GitHub issue: https://github.com/dani-garcia/vaultwarden/issues/5497

Hello!
First, thanks for creating vaultwarden!!
I have a question,
Considering vaultwarden store passwords, (safety is primordial)
Considering a argon 'ADMIN_TOKEN' is necessary to be safe (according to https://github.com/dani-garcia/vaultwarden/releases/tag/1.33.0)
Why is ADMIN_TOKEN not forced?
If I wouldnt have checked the new release, I would have never known. Its maybe in the log (?), but I dont think every one looks at the logs. I know I dont.
Thanks

Originally created by @jflecool2 on GitHub (Jan 29, 2025). Original GitHub issue: https://github.com/dani-garcia/vaultwarden/issues/5497 Hello! First, thanks for creating vaultwarden!! I have a question, Considering vaultwarden store passwords, (safety is primordial) Considering a argon 'ADMIN_TOKEN' is necessary to be safe (according to https://github.com/dani-garcia/vaultwarden/releases/tag/1.33.0) Why is ADMIN_TOKEN not forced? If I wouldnt have checked the new release, I would have never known. Its maybe in the log (?), but I dont think every one looks at the logs. I know I dont. Thanks
kerem closed this issue 2026-03-03 02:15:59 +03:00
Author
Owner

@stefan0xC commented on GitHub (Jan 29, 2025):

If you have no ADMIN_TOKEN (nor DISABLE_ADMIN_TOKEN=true) set, the /admin panel is not active and there would have been no security flaw to be exploited. Or to quote the linked advisory

This requires the DISABLE_ADMIN_TOKEN option to be enabled, as the authentication cookie will not be sent across site boundaries.

<!-- gh-comment-id:2622931159 --> @stefan0xC commented on GitHub (Jan 29, 2025): If you have no `ADMIN_TOKEN` (nor `DISABLE_ADMIN_TOKEN=true`) set, the `/admin` panel is not active and there would have been no security flaw to be exploited. Or to quote the [linked advisory](https://github.com/dani-garcia/vaultwarden/security/advisories/GHSA-f7r5-w49x-gxm3) > This requires the `DISABLE_ADMIN_TOKEN` option to be enabled, as the authentication cookie will not be sent across site boundaries.
Author
Owner

@BlackDex commented on GitHub (Jan 29, 2025):

And this, as @stefan0xC says, you need to disable it specificaly and the token is mandatory

<!-- gh-comment-id:2622943805 --> @BlackDex commented on GitHub (Jan 29, 2025): And this, as @stefan0xC says, you need to disable it specificaly and the token is mandatory
Author
Owner

@7heMech commented on GitHub (Jan 29, 2025):

Hey, sorry to chip in, would you guys recommend keeping admin disabled until changes need to be made?

<!-- gh-comment-id:2622987531 --> @7heMech commented on GitHub (Jan 29, 2025): Hey, sorry to chip in, would you guys recommend keeping admin disabled until changes need to be made?
Author
Owner

@stefan0xC commented on GitHub (Jan 29, 2025):

I'd recommend never setting DISABLE_ADMIN_TOKEN=true. If you need the /admin panel, I'd probably recommend setting up an additional form of access control (i.e. restricting it to a specific IP address / VPN) instead. I mean, disabling it and only enabling it when needed, should be fine too but personally I think that would be a bit of a hassle.

<!-- gh-comment-id:2623012981 --> @stefan0xC commented on GitHub (Jan 29, 2025): I'd recommend never setting `DISABLE_ADMIN_TOKEN=true`. If you need the `/admin` panel, I'd probably recommend setting up an additional form of access control (i.e. restricting it to a specific IP address / VPN) instead. I mean, disabling it and only enabling it when needed, should be fine too but personally I think that would be a bit of a hassle.
Author
Owner

@BlackDex commented on GitHub (Jan 29, 2025):

If you just set a token, and maybe as extra add basic auth or authelia or something via your reverse proxy, that should be more then enough.

<!-- gh-comment-id:2623014547 --> @BlackDex commented on GitHub (Jan 29, 2025): If you just set a token, and maybe as extra add basic auth or authelia or something via your reverse proxy, that should be more then enough.
Author
Owner

@BlackDex commented on GitHub (Jan 29, 2025):

Also, i would not change settings via the admin interface though. Only checking users and orgs, and diagnostics.

<!-- gh-comment-id:2623016084 --> @BlackDex commented on GitHub (Jan 29, 2025): Also, i would not change settings via the admin interface though. Only checking users and orgs, and diagnostics.
Author
Owner

@jflecool2 commented on GitHub (Jan 29, 2025):

Ok I think I get it:

  • No env: No admin = no problem
  • ADMIN_TOKEN = admin but safe = no problem
  • DISABLE_ADMIN_TOKEN = admin but unsafe = not recommended + GHSA-f7r5-w49x-gxm3
  • ADMIN_TOKEN + DISABLE_ADMIN_TOKEN = probably 'admin but safe' = no problem
    correct ?
<!-- gh-comment-id:2623017848 --> @jflecool2 commented on GitHub (Jan 29, 2025): Ok I think I get it: - No env: No admin = no problem - ADMIN_TOKEN = admin but safe = no problem - DISABLE_ADMIN_TOKEN = admin but unsafe = not recommended + GHSA-f7r5-w49x-gxm3 - ADMIN_TOKEN + DISABLE_ADMIN_TOKEN = probably 'admin but safe' = no problem correct ?
Author
Owner

@7heMech commented on GitHub (Jan 29, 2025):

Also, i would not change settings via the admin interface though. Only checking users and orgs, and diagnostics.

Oh, well, I setup everything from there already 😓
My instance is proxied behind cloudflare, I could setup some rules over there for /admin yeah, thanks so much for the advice!

<!-- gh-comment-id:2623019645 --> @7heMech commented on GitHub (Jan 29, 2025): > Also, i would not change settings via the admin interface though. Only checking users and orgs, and diagnostics. Oh, well, I setup everything from there already 😓 My instance is proxied behind cloudflare, I could setup some rules over there for /admin yeah, thanks so much for the advice!
Author
Owner

@BlackDex commented on GitHub (Jan 29, 2025):

Ok I think I get it:

Yes / No. The security issue is already fixed, with or without admin token. But it's not adviced.

  • ADMIN_TOKEN + DISABLE_ADMIN_TOKEN = probably 'admin but safe' = no problem

No since DISABLE_ADMIN_TOKENas the option says disables the token, and thus renders ADMIN_TOKEN not used.

<!-- gh-comment-id:2623031247 --> @BlackDex commented on GitHub (Jan 29, 2025): > Ok I think I get it: > > * DISABLE_ADMIN_TOKEN = admin but unsafe = not recommended + [GHSA-f7r5-w49x-gxm3](https://github.com/dani-garcia/vaultwarden/security/advisories/GHSA-f7r5-w49x-gxm3) Yes / No. The security issue is already fixed, with or without admin token. But it's not adviced. > * ADMIN_TOKEN + DISABLE_ADMIN_TOKEN = probably 'admin but safe' = no problem No since `DISABLE_ADMIN_TOKEN`as the option says disables the token, and thus renders `ADMIN_TOKEN` not used.
Author
Owner

@stefan0xC commented on GitHub (Jan 29, 2025):

  correct ?

No. DISABLE_ADMIN_TOKEN is inherently unsafe as it straight up enables the /admin panel to be used without a password. The idea would be that you are responsible for setting up a separate auth layer as described by the comment.
github.com/dani-garcia/vaultwarden@3c29f82974/.env.template (L395-L397)
So personally I think that option in itself is a security flaw, which is why I'd never recommend enabling it.

<!-- gh-comment-id:2623033534 --> @stefan0xC commented on GitHub (Jan 29, 2025): > correct ? No. `DISABLE_ADMIN_TOKEN` is inherently unsafe as it straight up enables the `/admin` panel to be used without a password. The idea would be that you are responsible for setting up a separate auth layer as described by the comment. https://github.com/dani-garcia/vaultwarden/blob/3c29f8297450c6e43369bc210383bb2d455565c0/.env.template#L395-L397 So personally I think that option in itself is a security flaw, which is why I'd never recommend enabling it.
Author
Owner

@jflecool2 commented on GitHub (Jan 29, 2025):

Ok I understand!
From where I stand, default is safe, ADMIN_TOKEN is safe, and DISABLE_ADMIN_TOKEN is somewhat inherently unsafe but the name already implies that its unsafe in my opinion, so its fine. thanks guys! Vaultwarden rocks!

<!-- gh-comment-id:2623040658 --> @jflecool2 commented on GitHub (Jan 29, 2025): Ok I understand! From where I stand, default is safe, ADMIN_TOKEN is safe, and DISABLE_ADMIN_TOKEN is somewhat inherently unsafe but the name already implies that its unsafe in my opinion, so its fine. thanks guys! Vaultwarden rocks!
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#2169
No description provided.