GHSA-RW74-VC9H-534J

Vulnerability from github – Published: 2026-04-29 21:54 – Updated: 2026-05-08 20:13
VLAI?
Summary
Admidio has CSRF on Admin Preferences that Triggers Unauthorized Backup, .htaccess Write, and Email Send
Details

Summary

Several administrative operations in Admidio's preferences module (database backup, test email, htaccess generation) fire via GET requests with no CSRF token validation. Because SameSite=Lax cookies travel with top-level GET navigations, an attacker forces an authenticated admin to trigger these actions from a malicious page.

Details

In modules/preferences.php, the backup, test_email, and htaccess modes accept GET parameters with no CSRF token check:

// modules/preferences.php - backup mode
case 'backup':
    // Creates full database dump and serves as download
    // No CSRF token validation
    $backupFile = $gDb->backup();
    // ... sends file to client
    break;

case 'test_email':
    // Sends test email from the server
    // No CSRF token validation
    break;

case 'htaccess':
    // Writes .htaccess file to disk
    // No CSRF token validation
    break;

The save mode in the same file validates CSRF via getFormObject(), confirming the developers intended CSRF protection but did not apply it to these other modes.

Because these are GET requests, SameSite=Lax browsers include session cookies on top-level cross-origin navigations, making CSRF exploitation trivial.

Proof of Concept

Simplified attacker page (csrf.html hosted on attacker origin):

<html>
<body>
<h1>Loading...</h1>
<!-- Trigger backup creation on victim's browser -->
<script>window.location = 'https://target-admidio.example.com/adm_program/modules/preferences.php?mode=backup';</script>
</body>
</html>

When an administrator visits this page, the browser navigates to the Admidio backup URL with full session cookies. The server generates a database dump and serves it as a download to the victim's browser. Note: the backup downloads to the victim's machine, not to the attacker. The attacker cannot read the response cross-origin.

For htaccess mode, the CSRF overwrites the .htaccess file on the server, disrupting the application. For test_email mode, it triggers email sends from the server, which an attacker can abuse for spam or to probe internal email infrastructure.

Impact

An attacker tricks an Admidio administrator into visiting a malicious page that triggers state-changing operations on the server:

  • Backup creation: forces the server to generate a full database dump. The backup downloads to the victim's browser, not to the attacker. However, repeated backup triggers can cause disk I/O and storage pressure on the server.
  • htaccess modification: overwrites the server's .htaccess file, breaking URL routing or disabling security headers.
  • Test email: fires email sends from the server, usable as a spam relay or to probe internal mail configuration.

The core issue is that state-changing operations run via unprotected GET requests. The victim only needs to visit a single attacker-controlled page while logged in.

Recommended Fix

  1. Change backup, test_email, and htaccess operations to require POST requests.
  2. Add CSRF token validation using the existing getFormObject() mechanism.
  3. As defense in depth, set SameSite=Strict on session cookies or add a confirmation step for destructive operations like database backup.

Found by aisafe.io

Show details on source website

{
  "affected": [
    {
      "database_specific": {
        "last_known_affected_version_range": "\u003c= 5.0.8"
      },
      "package": {
        "ecosystem": "Packagist",
        "name": "admidio/admidio"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "5.0.9"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2026-41663"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-352"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2026-04-29T21:54:30Z",
    "nvd_published_at": "2026-05-07T04:16:30Z",
    "severity": "LOW"
  },
  "details": "## Summary\n\nSeveral administrative operations in Admidio\u0027s preferences module (database backup, test email, htaccess generation) fire via GET requests with no CSRF token validation. Because `SameSite=Lax` cookies travel with top-level GET navigations, an attacker forces an authenticated admin to trigger these actions from a malicious page.\n\n## Details\n\nIn `modules/preferences.php`, the `backup`, `test_email`, and `htaccess` modes accept GET parameters with no CSRF token check:\n\n```php\n// modules/preferences.php - backup mode\ncase \u0027backup\u0027:\n    // Creates full database dump and serves as download\n    // No CSRF token validation\n    $backupFile = $gDb-\u003ebackup();\n    // ... sends file to client\n    break;\n\ncase \u0027test_email\u0027:\n    // Sends test email from the server\n    // No CSRF token validation\n    break;\n\ncase \u0027htaccess\u0027:\n    // Writes .htaccess file to disk\n    // No CSRF token validation\n    break;\n```\n\nThe `save` mode in the same file validates CSRF via `getFormObject()`, confirming the developers intended CSRF protection but did not apply it to these other modes.\n\nBecause these are GET requests, `SameSite=Lax` browsers include session cookies on top-level cross-origin navigations, making CSRF exploitation trivial.\n\n## Proof of Concept\n\nSimplified attacker page (`csrf.html` hosted on attacker origin):\n\n```html\n\u003chtml\u003e\n\u003cbody\u003e\n\u003ch1\u003eLoading...\u003c/h1\u003e\n\u003c!-- Trigger backup creation on victim\u0027s browser --\u003e\n\u003cscript\u003ewindow.location = \u0027https://target-admidio.example.com/adm_program/modules/preferences.php?mode=backup\u0027;\u003c/script\u003e\n\u003c/body\u003e\n\u003c/html\u003e\n```\n\nWhen an administrator visits this page, the browser navigates to the Admidio backup URL with full session cookies. The server generates a database dump and serves it as a download to the victim\u0027s browser. Note: the backup downloads to the victim\u0027s machine, not to the attacker. The attacker cannot read the response cross-origin.\n\nFor `htaccess` mode, the CSRF overwrites the `.htaccess` file on the server, disrupting the application. For `test_email` mode, it triggers email sends from the server, which an attacker can abuse for spam or to probe internal email infrastructure.\n\n## Impact\n\nAn attacker tricks an Admidio administrator into visiting a malicious page that triggers state-changing operations on the server:\n\n- **Backup creation**: forces the server to generate a full database dump. The backup downloads to the victim\u0027s browser, not to the attacker. However, repeated backup triggers can cause disk I/O and storage pressure on the server.\n- **htaccess modification**: overwrites the server\u0027s `.htaccess` file, breaking URL routing or disabling security headers.\n- **Test email**: fires email sends from the server, usable as a spam relay or to probe internal mail configuration.\n\nThe core issue is that state-changing operations run via unprotected GET requests. The victim only needs to visit a single attacker-controlled page while logged in.\n\n## Recommended Fix\n\n1. Change `backup`, `test_email`, and `htaccess` operations to require POST requests.\n2. Add CSRF token validation using the existing `getFormObject()` mechanism.\n3. As defense in depth, set `SameSite=Strict` on session cookies or add a confirmation step for destructive operations like database backup.\n\n---\n*Found by [aisafe.io](https://aisafe.io)*",
  "id": "GHSA-rw74-vc9h-534j",
  "modified": "2026-05-08T20:13:59Z",
  "published": "2026-04-29T21:54:30Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/Admidio/admidio/security/advisories/GHSA-rw74-vc9h-534j"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-41663"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/Admidio/admidio"
    },
    {
      "type": "WEB",
      "url": "https://github.com/Admidio/admidio/releases/tag/v5.0.9"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:U/C:N/I:L/A:L",
      "type": "CVSS_V3"
    }
  ],
  "summary": "Admidio has CSRF on Admin Preferences that Triggers Unauthorized Backup, .htaccess Write, and Email Send"
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…
Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.


Loading…

Detection rules are retrieved from Rulezet.

Loading…

Loading…