Summary
modules/sso/clients.php validates an adm_csrf_token on every state-changing branch except enable. The enable case loads the SAML or OIDC client by UUID, calls $client->enable($enabled), and persists the new state with no token check. Because the action is reachable via plain GET parameters, a third-party page can trick an authenticated administrator into disabling (or silently re-enabling) any configured SAML or OIDC client. Disabling an SSO client breaks every downstream relying-party application that authenticates through it.
Details
Vulnerable Code
modules/sso/clients.php:84-115 — the file's other branches each begin with SecurityUtils::validateCsrfToken($_POST['adm_csrf_token']);, but case 'enable': does not:
case 'delete_oidc':
// check the CSRF token of the form against the session token
SecurityUtils::validateCsrfToken($_POST['adm_csrf_token']);
$oidcService = new OIDCService($gDb, $gCurrentUser);
$client = $oidcService->getClientFromUUID($getClientUUID);
$client->delete();
echo json_encode(array('status' => 'success'));
break;
case 'enable': // <- no CSRF validation
$enabled = admFuncVariableIsValid($_GET, 'enabled', 'boolean');
$client = new SAMLClient($gDb);
$client->readDataByUuid($getClientUUID);
if ($client->isNewRecord()) {
// Not a SAML record, so try OIDC:
$client = new OIDCClient($gDb);
$client->readDataByUuid($getClientUUID);
}
if ($client->isNewRecord()) {
throw new Exception('SYS_SSO_INVALID_CLIENT');
}
$client->enable($enabled);
$client->save();
echo json_encode(['success' => true]);
break;
The enable($enabled) call is documented to set a single boolean column on the SAML / OIDC client row — smc_enabled for SAML, ocl_enabled for OIDC — and save() persists the change immediately. The handler accepts plain GET (admFuncVariableIsValid($_GET, 'enabled', 'boolean')), so a or auto-submitting form is sufficient.