GHSA-g39v-qrj6-jxrh: AVideo: IDOR in AI Plugin Allows Stealing Other Users' AI-Generated Metadata and Transcriptions
SummaryThe 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.DetailsIn `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:**Line 29 — metatags path (no ownership check):****Line 146 — transcription path (no ownership check):**The `ObjectYPT` base class constructor performs a simple database lookup with no authorization:The 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).In contrast, `plugin/AI/delete.json.php` correctly validates ownership by traversing to the parent `Ai_responses` record:This proves the developers intended ownership validation but omitted it in the save endpoint.PoC**Prerequisites:** Two user accounts (attacker and victim), both with `canUseAI` permission. The victim has generated AI metadata or transcription for a private video.**Step 1: Attacker enumerates AI response IDs to steal metadata**AI response IDs are sequential integers. The attacker supplies their own `videos_id` (which they can edit) but references a victim's AI response `id`:**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.**Step 2: Attacker steals full transcription (higher impact)****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.**Step 3: Enumerate all responses**Impact**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.**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.**Trivial enumeration:** AI response IDs are sequential integers, allowing an attacker to systematically harvest all AI-generated content across the platform.**Low barrier:** Any user with `canUseAI` permission who owns at least one video can exploit this. No admin access required.Recommended FixAdd 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`:
CVSS v3.1: 4.3