#1244·Wallos

"Disable password login" is enforced only in the UI; login.php still accepts username/password

Author: janbernloehrCreated Sep 27, 2026Updated Sep 27, 2026

Affected: other/wallos <= 5.8.1 (also main as of 2026-09-27) Weakness: CWE-602, Client-Side Enforcement of Server-Side Security Suggested CVSS 3.1: 7.4, CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N

Summary

With OIDC enabled and password login disabled (the admin setting, or OIDC_DISABLE_PASSWORD_LOGIN=true), the login page stops rendering the username/password form, but login.php still processes a submitted username/password POST and signs the user in when the password is correct. The setting only hides the form. Password authentication stays fully available to anyone who sends the two form fields directly.

Admins disable password login precisely so that only their identity provider (and its MFA and lockout policies) can grant access. On an internet-facing instance, every local account's password remains open to guessing and credential stuffing, bypassing the IdP entirely.

Vulnerable Code

login.php computes the flag (lines 124-131):

php
$password_login_disabled = false;
// ...
if ($oidcEnabled) {
    $oidcSettings = $oidcConfiguration['settings'];
    $password_login_disabled = (int) $oidcSettings['password_login_disabled'] === 1;

but the password handler (line 162) never checks it:

php
if (isset($_POST['username']) && isset($_POST['password'])) {
    $username = $_POST['username'];
    $password = $_POST['password'];
    // ... SELECT ... WHERE username = :username; password_verify(...) -> session + optional remember-me cookie

The flag is only used for presentation: hiding the form (line 362), the separator and links (line 388), and the registration/reset links (line 268).

Dynamic Reproduction (v5.8.1, bellamy/wallos:v5_8_1)

Lab instance on a fresh volume:

  1. Registered a local user repro with a password.
  2. Restarted with OIDC configured and password login disabled: OIDC_ENABLED=true, OIDC_DISABLE_PASSWORD_LOGIN=true, plus provider name, client ID/secret and auth/token/userinfo URLs (the IdP never needs to be reachable for this test).
  3. Observed:
GET  /login.php                                 -> no password field, only "Login with TestIdP"
POST /login.php  username=repro&password=<valid> -> 302 Location: /
GET  /           (same session)                  -> 302 Location: subscriptions.php   (signed in)
POST /login.php  ... + remember=on               -> 302 Location: /, sets wallos_login cookie (30 days)
POST /login.php  username=repro&password=wrong   -> 200, login page with error
GET  /           (no session)                    -> 302 Location: login.php

The same request succeeds with password login enabled, i.e. disabling it changes nothing on the server.

Impact

Password login cannot actually be turned off. Any local account remains reachable by password even though the admin believes only the IdP can authenticate users. Attackers can guess or stuff passwords against login.php without passing the IdP's MFA, conditional access or lockout, and a successful guess yields a full session (and a 30-day remember-me cookie).

Recommended Fix

Refuse password authentication on the server whenever it is disabled, before any credential lookup:

php
if (isset($_POST['username']) && isset($_POST['password'])) {
    if ($password_login_disabled) {
        // Password login is disabled: never evaluate submitted credentials.
        http_response_code(403);
        $loginFailed = true;
    } else {
        // ... existing password handler ...
    }
}

Related (same flag, same gap)

Neither checks $password_login_disabled, so they may deserve the same guard:

  • passwordreset.php: the reset flow still works when SMTP is configured, letting a user set a new local password while password login is supposedly off.
  • registration.php: gated only by registrations_open. With OIDC-only login, creating local password accounts arguably should not be possible either.

Workaround

Until fixed, drop the password endpoints at the reverse proxy for untrusted networks, e.g. Caddy:

caddyfile
@password_forms {
    not remote_ip private_ranges
    method POST
    path /login.php /registration.php /passwordreset.php
}
abort @password_forms