{"id":"GHSA-584p-rpvq-35vf","summary":"AVideo has SQL Injection in category.php fixCleanTitle() via Unparameterized clean_title and id Variables","details":"### Summary\n\nThe `fixCleanTitle()` static method in `objects/category.php` constructs a SQL SELECT query by directly interpolating both `$clean_title` and `$id` into the query string without using prepared statements or parameterized queries. An attacker who can trigger category creation or renaming with a crafted title value can inject arbitrary SQL.\n\n### Details\n\n**File:** `objects/category.php`\n\n**Vulnerable code:**\n```php\npublic static function fixCleanTitle($clean_title, $count, $id, $original_title = \"\")\n{\n    global $global;\n\n    $sql = \"SELECT * FROM categories WHERE clean_name = '{$clean_title}' \";\n    if (!empty($id)) {\n        $sql .= \" AND id != {$id} \";\n    }\n    $sql .= \" LIMIT 1\";\n    $res = sqlDAL::readSql($sql, \"\", [], true);\n    // ...\n}\n```\n\nBoth `$clean_title` (a user-supplied category name after slug conversion) and `$id` (the category ID being edited) are embedded directly into the SQL string. The `$clean_title` value derives from user input through the category save workflow — it is the \"clean\" URL-slug version of whatever category name the user submits. No escaping or parameterization is applied before the value is placed inside single quotes in the query.\n\n### PoC\n\nAn authenticated admin creates or renames a category with the title:\n```\ntest' UNION SELECT username,password,3,4,5,6,7,8,9,10 FROM users-- -\n```\n\nAfter slug conversion (which typically only strips spaces and special characters, leaving SQL metacharacters that survive inside single quotes), the backend executes:\n```sql\nSELECT * FROM categories WHERE clean_name = 'test' UNION SELECT username,password,3,4,5,6,7,8,9,10 FROM users-- -'  LIMIT 1\n```\n\nThis returns rows from the `users` table, enabling full credential exfiltration. The `$id` concatenation point is also injectable via a crafted numeric+SQL-suffix value if integer validation is absent.\n\n### Impact\n\n- **Type:** SQL Injection (CWE-89)\n- **Severity:** High\n- **Authentication required:** Admin-level (category management), though the same pattern may be reachable via lower-privilege paths depending on plugin configuration\n- **Impact:** Full database read; credentials, private video metadata, user PII accessible via UNION injection\n- **Fix:** Replace direct interpolation with parameterized queries — use `?` placeholders and pass `$clean_title` and `(int)$id` as bound parameters","aliases":["CVE-2026-33770"],"modified":"2026-03-27T21:50:04.773965Z","published":"2026-03-26T18:15:11Z","database_specific":{"nvd_published_at":"2026-03-27T17:16:29Z","cwe_ids":["CWE-89"],"severity":"HIGH","github_reviewed":true,"github_reviewed_at":"2026-03-26T18:15:11Z"},"references":[{"type":"WEB","url":"https://github.com/WWBN/AVideo/security/advisories/GHSA-584p-rpvq-35vf"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-33770"},{"type":"WEB","url":"https://github.com/WWBN/AVideo/commit/994cc2b3d802b819e07e6088338e8bf4e484aae4"},{"type":"PACKAGE","url":"https://github.com/WWBN/AVideo"}],"affected":[{"package":{"name":"wwbn/avideo","ecosystem":"Packagist","purl":"pkg:composer/wwbn/avideo"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"last_affected":"26.0"}]}],"versions":["10.4","10.8","11","11.1","11.1.1","11.5","11.6","12.4","14.3","14.3.1","14.4","18.0","21.0","22.0","24.0","25.0","26.0"],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/03/GHSA-584p-rpvq-35vf/GHSA-584p-rpvq-35vf.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V4","score":"CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N"}]}