{
    "document": {
        "category": "csaf_base",
        "csaf_version": "2.0",
        "distribution": {
            "tlp": {
                "label": "WHITE"
            }
        },
        "lang": "en",
        "notes": [
            {
                "category": "legal_disclaimer",
                "text": "The Netherlands Cyber Security Center (henceforth: NCSC-NL) maintains this portal to enhance access to its information and vulnerabilities. The use of this information is subject to the following terms and conditions:\n\nThe vulnerabilities disclosed in this portal are gathered by NCSC-NL from a variety of open sources, which the user can retrieve from other platforms. NCSC-NL makes every reasonable effort to ensure that the content of this portal is kept up to date, and that it is accurate and complete. Nevertheless, NCSC-NL cannot entirely rule out the possibility of errors, and therefore cannot give any warranty in respect of its completeness, accuracy or real-time keeping up-to-date. NCSC-NL does not control nor guarantee the accuracy, relevance, timeliness or completeness of information obtained from these external sources. The vulnerabilities disclosed in this portal are intended solely for the convenience of professional parties to take appropriate measures to manage the risks posed to the cybersecurity. No rights can be derived from the information provided therein.\n\nNCSC-NL and the Kingdom of the Netherlands assume no legal liability or responsibility for any damage resulting from either the use or inability of use of the vulnerabilities disclosed in this portal. This includes damage resulting from the inaccuracy of incompleteness of the information contained in it.\nThe information on this page is subject to Dutch law. All disputes related to or arising from the use of this portal regarding the disclosure of vulnerabilities will be submitted to the competent court in The Hague. This choice of means also applies to the court in summary proceedings."
            }
        ],
        "publisher": {
            "category": "coordinator",
            "contact_details": "cert@ncsc.nl",
            "name": "National Cyber Security Centre",
            "namespace": "https://www.ncsc.nl/"
        },
        "title": "CVE-2026-34364",
        "tracking": {
            "current_release_date": "2026-03-30T19:18:48.645813Z",
            "generator": {
                "date": "2026-02-17T15:00:00Z",
                "engine": {
                    "name": "V.E.L.M.A",
                    "version": "1.7"
                }
            },
            "id": "CVE-2026-34364",
            "initial_release_date": "2026-03-27T19:47:41.364037Z",
            "revision_history": [
                {
                    "date": "2026-03-27T19:47:41.364037Z",
                    "number": "1",
                    "summary": "CVE created.| Source created.| CVE status created. (valid)| Description created for source.| CVSS created.| References created (2).| CWES updated (1)."
                },
                {
                    "date": "2026-03-27T19:47:44.569075Z",
                    "number": "2",
                    "summary": "NCSC Score created."
                },
                {
                    "date": "2026-03-27T19:48:39.578413Z",
                    "number": "3",
                    "summary": "Source created.| CVE status created. (valid)| Description created for source.| CVSS created.| Products connected (1).| References created (2).| CWES updated (1)."
                },
                {
                    "date": "2026-03-27T19:48:41.661615Z",
                    "number": "4",
                    "summary": "NCSC Score updated."
                },
                {
                    "date": "2026-03-27T21:27:09.253475Z",
                    "number": "5",
                    "summary": "Unknown change."
                },
                {
                    "date": "2026-03-29T00:38:16.769849Z",
                    "number": "6",
                    "summary": "Source connected.| CVE status created. (valid)| EPSS created."
                },
                {
                    "date": "2026-03-30T19:15:12.009182Z",
                    "number": "7",
                    "summary": "Source created.| CVE status created. (valid)| Description created for source.| CVSS created.| References created (4).| CWES updated (1)."
                }
            ],
            "status": "interim",
            "version": "7"
        }
    },
    "product_tree": {
        "branches": [
            {
                "branches": [
                    {
                        "branches": [
                            {
                                "category": "product_version_range",
                                "name": "vers:unknown/<=26.0",
                                "product": {
                                    "name": "vers:unknown/<=26.0",
                                    "product_id": "CSAFPID-5893889",
                                    "product_identification_helper": {
                                        "cpe": "cpe:2.3:a:wwbn:avideo:*:*:*:*:*:*:*:*"
                                    }
                                }
                            }
                        ],
                        "category": "product_name",
                        "name": "AVideo"
                    }
                ],
                "category": "vendor",
                "name": "WWBN"
            }
        ]
    },
    "vulnerabilities": [
        {
            "cve": "CVE-2026-34364",
            "cwe": {
                "id": "CWE-863",
                "name": "Incorrect Authorization"
            },
            "notes": [
                {
                    "category": "description",
                    "text": "WWBN AVideo is an open source video platform. In versions up to and including 26.0, the `categories.json.php` endpoint, which serves the category listing API, fails to enforce user group-based access controls on categories. In the default request path (no `?user=` parameter), user group filtering is entirely skipped, exposing all non-private categories including those restricted to specific user groups. When the `?user=` parameter is supplied, a type confusion bug causes the filter to use the admin user's (user_id=1) group memberships instead of the current user's, rendering the filter ineffective. Commit 6e8a673eed07be5628d0b60fbfabd171f3ce74c9 contains a fix.",
                    "title": "nvd - https://services.nvd.nist.gov/rest/json/cves/2.0?cveId=CVE-2026-34364"
                },
                {
                    "category": "description",
                    "text": "WWBN AVideo is an open source video platform. In versions up to and including 26.0, the `categories.json.php` endpoint, which serves the category listing API, fails to enforce user group-based access controls on categories. In the default request path (no `?user=` parameter), user group filtering is entirely skipped, exposing all non-private categories including those restricted to specific user groups. When the `?user=` parameter is supplied, a type confusion bug causes the filter to use the admin user's (user_id=1) group memberships instead of the current user's, rendering the filter ineffective. Commit 6e8a673eed07be5628d0b60fbfabd171f3ce74c9 contains a fix.",
                    "title": "cveprojectv5 - https://raw.githubusercontent.com/CVEProject/cvelistV5/main/cves/2026/34xxx/CVE-2026-34364.json"
                },
                {
                    "category": "description",
                    "text": "## Summary\n\nThe `categories.json.php` endpoint, which serves the category listing API, fails to enforce user group-based access controls on categories. In the default request path (no `?user=` parameter), user group filtering is entirely skipped, exposing all non-private categories including those restricted to specific user groups. When the `?user=` parameter is supplied, a type confusion bug causes the filter to use the admin user's (user_id=1) group memberships instead of the current user's, rendering the filter ineffective.\n\n## Details\n\nThe vulnerability has two related failures in `objects/categories.json.php` and `objects/category.php`:\n\n**1. Default request — group filtering completely skipped**\n\nIn `categories.json.php:17-24`, when `$_GET['user']` is not set, `$sameUserGroupAsMe` defaults to `false`:\n\n```php\n// categories.json.php:17-24\n$onlyWithVideos = false;\n$sameUserGroupAsMe = false;\nif(!empty($_GET['user'])){\n    $onlyWithVideos = true;\n    $sameUserGroupAsMe = true;\n}\n$categories = Category::getAllCategories(true, $onlyWithVideos, false, $sameUserGroupAsMe);\n```\n\nIn `category.php:438-452`, the user group filter is gated on `$sameUserGroupAsMe` being truthy:\n\n```php\n// category.php:438-452\nif ($sameUserGroupAsMe) {\n    $users_groups = UserGroups::getUserGroups($sameUserGroupAsMe);\n    $users_groups_id = array(0);\n    foreach ($users_groups as $value) {\n        $users_groups_id[] = $value['id'];\n    }\n    $sql .= \" AND (\"\n        . \"(SELECT count(*) FROM categories_has_users_groups chug WHERE c.id = chug.categories_id) = 0 OR \"\n        . \"(SELECT count(*) FROM categories_has_users_groups chug2 WHERE c.id = chug2.categories_id AND users_groups_id IN (\" . implode(',', $users_groups_id) . \")) >= 1 \"\n        . \")\";\n}\n```\n\nSince `$sameUserGroupAsMe = false`, the entire block is skipped. All non-private categories are returned regardless of their user group restrictions set via the `categories_has_users_groups` table.\n\n**2. With `?user=` parameter — boolean-to-integer type confusion**\n\nWhen `$_GET['user']` is non-empty, `$sameUserGroupAsMe` is set to boolean `true` (line 21). This value is passed to `UserGroups::getUserGroups($sameUserGroupAsMe)` at `category.php:440`.\n\nIn `userGroups.php:349-379`, the parameter is used as `$users_id`:\n\n```php\n// userGroups.php:349,371,379\npublic static function getUserGroups($users_id){\n    // ...\n    $sql = \"SELECT uug.*, ug.* FROM users_groups ug\"\n            . \" LEFT JOIN users_has_users_groups uug ON users_groups_id = ug.id WHERE users_id = ? \";\n    // ...\n    $res = sqlDAL::readSql($sql, \"i\", [$users_id]);\n```\n\nPHP casts boolean `true` to integer `1` for the prepared statement bind, resulting in `WHERE users_id = 1` — fetching the **admin user's** group memberships. The filter then allows categories visible to admin groups, effectively granting any unauthenticated user the admin's category visibility.\n\n**3. getTotalCategories also unfiltered**\n\n`getTotalCategories()` at `category.php:978` does not accept a `$sameUserGroupAsMe` parameter at all, so the total count always reflects the unfiltered category set.\n\nThe endpoint requires no authentication — it uses `allowOrigin()` (a CORS header helper) and is publicly routable via the `.htaccess` rewrite rule: `RewriteRule ^categories.json$ objects/categories.json.php`.\n\n## PoC\n\n```bash\n# 1. Fetch all categories without authentication — no group filtering applied\ncurl -s 'https://target/categories.json' | jq '.rows[] | {id, name, private, users_groups_ids_array}'\n\n# Returns ALL non-private categories including those restricted to specific user groups.\n# The users_groups_ids_array field reveals which groups each category is restricted to.\n# Categories with non-empty users_groups_ids_array should be hidden from users not in those groups.\n\n# 2. Attempt the \"filtered\" path — still broken due to boolean->int cast\ncurl -s 'https://target/categories.json?user=1' | jq '.rows[] | {id, name, private, users_groups_ids_array}'\n\n# This applies group filtering but uses admin's groups (users_id=1) instead of the\n# current user's groups, so group-restricted categories visible to admin are exposed.\n```\n\n## Impact\n\nAny unauthenticated user can:\n\n- **Enumerate all non-private categories** regardless of user group restrictions, bypassing the intended access control model where categories are restricted to specific user groups via the CustomizeUser plugin's `categories_has_users_groups` table.\n- **Discover the user group configuration** for each category via the `users_groups_ids_array` field in the response, revealing the internal access control structure.\n- **Identify group-restricted content areas** that should be hidden, which could be used to target further access control bypasses on the videos within those categories.\n\nThe severity is Medium because this is an information disclosure of category metadata (names, descriptions, icons, group assignments) rather than the actual video content within restricted categories. However, the exposure of the access control structure itself (which groups have access to which categories) is a meaningful information leak.\n\n## Recommended Fix\n\nIn `objects/categories.json.php`, pass the current user's ID (or 0 for unauthenticated users) instead of a boolean:\n\n```php\n// categories.json.php — replace lines 17-24\n$onlyWithVideos = false;\n$sameUserGroupAsMe = false;\nif(!empty($_GET['user'])){\n    $onlyWithVideos = true;\n}\n// Always apply user group filtering using the logged-in user's ID\n$currentUserId = User::getId();\nif (!empty($currentUserId)) {\n    $sameUserGroupAsMe = $currentUserId;\n} else {\n    // For unauthenticated users, pass a value that will filter to only\n    // categories with no group restrictions\n    $sameUserGroupAsMe = -1; // Non-existent user ID, will match no groups\n}\n\n$categories = Category::getAllCategories(true, $onlyWithVideos, false, $sameUserGroupAsMe);\n```\n\nAdditionally, in `category.php:getAllCategories()`, ensure the group filter block always runs when categories have group restrictions, not only when `$sameUserGroupAsMe` is truthy. A more robust approach:\n\n```php\n// category.php — replace the sameUserGroupAsMe block (lines 438-452)\n// Always filter by user groups if any categories have group restrictions\n$users_groups_id = array(0);\nif ($sameUserGroupAsMe && $sameUserGroupAsMe > 0) {\n    $users_groups = UserGroups::getUserGroups($sameUserGroupAsMe);\n    foreach ($users_groups as $value) {\n        $users_groups_id[] = $value['id'];\n    }\n}\n$sql .= \" AND (\"\n    . \"(SELECT count(*) FROM categories_has_users_groups chug WHERE c.id = chug.categories_id) = 0 OR \"\n    . \"(SELECT count(*) FROM categories_has_users_groups chug2 WHERE c.id = chug2.categories_id AND users_groups_id IN (\" . implode(',', $users_groups_id) . \")) >= 1 \"\n    . \")\";\n```\n\nThis ensures that even when no user is logged in, categories with group restrictions are hidden (only categories with zero group restrictions are shown). The `getTotalCategories()` function should also be updated to accept and apply the same `$sameUserGroupAsMe` filter.",
                    "title": "github - https://api.github.com/advisories/GHSA-73gr-r64q-7jh4"
                },
                {
                    "category": "other",
                    "text": "9e-05",
                    "title": "EPSS"
                },
                {
                    "category": "other",
                    "text": "4.6",
                    "title": "NCSC Score"
                },
                {
                    "category": "other",
                    "text": "Is related to CWE-863 (Incorrect Authorization)",
                    "title": "NCSC Score top increasing factors"
                },
                {
                    "category": "other",
                    "text": "There is cwe data available from source Nvd, Is related to (a version of) an uncommon product",
                    "title": "NCSC Score top decreasing factors"
                }
            ],
            "product_status": {
                "known_affected": [
                    "CSAFPID-5893889"
                ]
            },
            "references": [
                {
                    "category": "external",
                    "summary": "Source - nvd",
                    "url": "https://services.nvd.nist.gov/rest/json/cves/2.0?cveId=CVE-2026-34364"
                },
                {
                    "category": "external",
                    "summary": "Source - cveprojectv5",
                    "url": "https://raw.githubusercontent.com/CVEProject/cvelistV5/main/cves/2026/34xxx/CVE-2026-34364.json"
                },
                {
                    "category": "external",
                    "summary": "Source - first",
                    "url": "https://api.first.org/data/v1/epss?limit=10000&offset=0"
                },
                {
                    "category": "external",
                    "summary": "Source - github",
                    "url": "https://api.github.com/advisories/GHSA-73gr-r64q-7jh4"
                },
                {
                    "category": "external",
                    "summary": "Reference - cveprojectv5; github; nvd",
                    "url": "https://github.com/WWBN/AVideo/commit/6e8a673eed07be5628d0b60fbfabd171f3ce74c9"
                },
                {
                    "category": "external",
                    "summary": "Reference - cveprojectv5; github; nvd",
                    "url": "https://github.com/WWBN/AVideo/security/advisories/GHSA-73gr-r64q-7jh4"
                },
                {
                    "category": "external",
                    "summary": "Reference - github",
                    "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-34364"
                },
                {
                    "category": "external",
                    "summary": "Reference - github",
                    "url": "https://github.com/advisories/GHSA-73gr-r64q-7jh4"
                }
            ],
            "scores": [
                {
                    "cvss_v3": {
                        "version": "3.1",
                        "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N",
                        "baseScore": 5.3,
                        "baseSeverity": "MEDIUM"
                    },
                    "products": [
                        "CSAFPID-5893889"
                    ]
                }
            ],
            "title": "CVE-2026-34364"
        }
    ]
}