GIVE YOUR AGENT THE EVIDENCE

Set up in your agent.

One prompt to get started. Paste it into your coding agent to connect cve.new through MCP and bring vulnerability context into your workflow.

Your agent needs remote MCP support and access to https://cve.new/mcp.

Read the setup guide

GIVE YOUR AGENT THE EVIDENCE

Investigate in your agent.

Turn this advisory into a focused investigation. Ask your agent to check your project’s versions, explain the evidence, and suggest a compatible fix.

Your agent needs remote MCP support and access to https://cve.new/mcp.

Read the setup guide

GHSA-rw74-vc9h-534jlow3.5

Admidio has CSRF on Admin Preferences that Triggers Unauthorized Backup, .htaccess Write, and Email Send

Check your stack

The advisory, in context

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

Affected packages

Start with the recorded fix for your release branch. Check your installed version and test compatibility before upgrading. Fixing this advisory does not rule out other vulnerabilities in the release.

Ecosystem versions

Earlier releases before 5.0.9

Fixed in 5.0.9

54 explicitly affected versions

4.1.0, 4.1.3, v4.2-Beta.1, v4.2-Beta.2, v4.2-Beta.3, v4.2.0, v4.2.1, v4.2.10, v4.2.11, v4.2.12, v4.2.13, v4.2.14, v4.2.2, v4.2.3, v4.2.4, v4.2.5, v4.2.6, v4.2.7, v4.2.8, v4.2.9, v4.3-Beta.1, v4.3-Beta.3, v4.3-Beta.4, v4.3-Beta.5, v4.3.0, v4.3.1, v4.3.10, v4.3.11, v4.3.12, v4.3.13, v4.3.14, v4.3.15, v4.3.16, v4.3.17, v4.3.2, v4.3.3, v4.3.4, v4.3.5, v4.3.6, v4.3.7, v4.3.8, v4.3.9, v5.0-Beta.1, v5.0-Beta.2, v5.0-Beta.3, v5.0.0, v5.0.1, v5.0.2, v5.0.3, v5.0.4, v5.0.5, v5.0.6, v5.0.7, v5.0.8

View affected-version evidence
{
  "ranges": [
    {
      "events": [
        {
          "introduced": "0"
        },
        {
          "fixed": "5.0.9"
        }
      ],
      "type": "ECOSYSTEM"
    }
  ],
  "versions": [
    "4.1.0",
    "4.1.3",
    "v4.2-Beta.1",
    "v4.2-Beta.2",
    "v4.2-Beta.3",
    "v4.2.0",
    "v4.2.1",
    "v4.2.10",
    "v4.2.11",
    "v4.2.12",
    "v4.2.13",
    "v4.2.14",
    "v4.2.2",
    "v4.2.3",
    "v4.2.4",
    "v4.2.5",
    "v4.2.6",
    "v4.2.7",
    "v4.2.8",
    "v4.2.9",
    "v4.3-Beta.1",
    "v4.3-Beta.3",
    "v4.3-Beta.4",
    "v4.3-Beta.5",
    "v4.3.0",
    "v4.3.1",
    "v4.3.10",
    "v4.3.11",
    "v4.3.12",
    "v4.3.13",
    "v4.3.14",
    "v4.3.15",
    "v4.3.16",
    "v4.3.17",
    "v4.3.2",
    "v4.3.3",
    "v4.3.4",
    "v4.3.5",
    "v4.3.6",
    "v4.3.7",
    "v4.3.8",
    "v4.3.9",
    "v5.0-Beta.1",
    "v5.0-Beta.2",
    "v5.0-Beta.3",
    "v5.0.0",
    "v5.0.1",
    "v5.0.2",
    "v5.0.3",
    "v5.0.4",
    "v5.0.5",
    "v5.0.6",
    "v5.0.7",
    "v5.0.8"
  ]
}

References