Default admin password yields a fully privileged API token before it is changed #2
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?
Severity
Medium
What's going on
The built-in admin accepts the well-known default password
passworduntil a new password is stored. Login still returns a fully privileged JWT even whenmustChangePasswordis true. That flag is advisory;/api/proxy-hostsand the rest of the mutating admin API accept the token immediately.The admin UI/API also listens on all interfaces (empty host /
0.0.0.0withDISABLE_IPV6=1). The sample compose file publishes host port 81 to the container.Practical impact
On first boot (or any install that has not yet changed the password), anyone who can hit the published admin port can log in with
passwordand reconfigure the reverse proxy.PROXY_MODE=developmentskips even the UI hint.This is separate from the JWT signing-secret issue: after the password is changed, default-password login stops working, but a well-known JWT secret would still be an issue until that is fixed.
Fix
/api/loginand/api/users/me/passwordshould succeed with the bootstrap token until a non-default password is stored.:81on an untrusted network before the password is changed.ADMIN_PASSWORDfrom the environment on first boot.Not sending a code PR for this one; the JWT secret fix is the higher-leverage change and this needs a small product/API decision so tests that use the default password keep working in development.
Triaged as medium. Default password still yields a full admin JWT; mustChangePassword is advisory. Separate from #1 (now fixed by #3). Next: bootstrap lock until password is changed, do not publish :81 on untrusted nets. Needs a small API/test decision so I am not stuffing it into #3. Leaving open.