GHSA-8C6H-7G6X-M5X4
Vulnerability from github – Published: 2026-06-23 22:27 – Updated: 2026-06-23 22:27Missing Authorization in API CategoryController — CVE-2026-24421 fixed BackupController by adding userHasPermission(PermissionType::BACKUP). The same fix was NOT applied to 4 other write endpoints in the public API. All 4 only call hasValidToken() (shared API key) but never call userHasPermission(), allowing any API token holder to perform admin operations regardless of their user permissions.
Summary
CVE-2026-24421 fixed BackupController by adding: $this->userHasPermission(PermissionType::BACKUP);
The same fix was NOT applied to 4 other write endpoints in the public API. All 4 only call $this->hasValidToken() — which checks a shared API key header, NOT the individual user's role permissions.
Affected Endpoints
-
src/phpMyFAQ/Controller/Api/CategoryController.php → create() POST /api/v4.0/category Missing: userHasPermission(PermissionType::CATEGORY_ADD) Any API token holder can create categories regardless of user role.
-
src/phpMyFAQ/Controller/Api/FaqController.php → create() POST /api/v4.0/faq Missing: userHasPermission(PermissionType::FAQ_ADD) Any API token holder can create FAQ entries regardless of user role.
-
src/phpMyFAQ/Controller/Api/FaqController.php → update() PUT /api/v4.0/faq Missing: userHasPermission(PermissionType::FAQ_EDIT) Any API token holder can update any FAQ entry regardless of user role.
-
src/phpMyFAQ/Controller/Api/QuestionController.php → create() POST /api/v4.0/question Missing: permission check Any API token holder can create questions regardless of user role.
Root Cause
All 4 methods only call: $this->hasValidToken(); ← shared API key, not per-user
The fixed BackupController correctly calls: $this->userHasPermission(PermissionType::BACKUP);
PermissionType::CATEGORY_ADD, FAQ_ADD, FAQ_EDIT all exist in src/phpMyFAQ/Enums/PermissionType.php — they just are not being used.
Fix
Add userHasPermission() before the logic in each method:
// CategoryController.create()
$this->userHasPermission(PermissionType::CATEGORY_ADD);
// FaqController.create()
$this->userHasPermission(PermissionType::FAQ_ADD);
// FaqController.update()
$this->userHasPermission(PermissionType::FAQ_EDIT);
Reporter
CONTACT Santhoshini Ganta Github:@santhoshinipayload Email: santhoshinive75@gmail.com LinkedIn: http://linkedin.com/in/santhoshini-g-1440621ba
{
"affected": [
{
"package": {
"ecosystem": "Packagist",
"name": "thorsten/phpmyfaq"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "4.1.4"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "Packagist",
"name": "phpmyfaq/phpmyfaq"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "4.1.4"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-49205"
],
"database_specific": {
"cwe_ids": [
"CWE-862"
],
"github_reviewed": true,
"github_reviewed_at": "2026-06-23T22:27:34Z",
"nvd_published_at": "2026-06-18T22:16:31Z",
"severity": "MODERATE"
},
"details": "Missing Authorization in API CategoryController \u2014 CVE-2026-24421 fixed BackupController by adding userHasPermission(PermissionType::BACKUP). The same fix was NOT applied to 4 other write endpoints in the public API. All 4 only call hasValidToken() (shared API key) but never call userHasPermission(), allowing any API token holder to perform admin operations regardless of their user permissions.\n\n## Summary\n\nCVE-2026-24421 fixed BackupController by adding: $this-\u003euserHasPermission(PermissionType::BACKUP);\n\nThe same fix was NOT applied to 4 other write endpoints in the public API. All 4 only call $this-\u003ehasValidToken() \u2014 which checks a shared API key header, NOT the individual user\u0027s role permissions.\n\n## Affected Endpoints\n\n1. src/phpMyFAQ/Controller/Api/CategoryController.php \u2192 create() POST /api/v4.0/category\nMissing: userHasPermission(PermissionType::CATEGORY_ADD)\nAny API token holder can create categories regardless of user role.\n\n2. src/phpMyFAQ/Controller/Api/FaqController.php \u2192 create() POST /api/v4.0/faq\n Missing: userHasPermission(PermissionType::FAQ_ADD)\n Any API token holder can create FAQ entries regardless of user role.\n\n3. src/phpMyFAQ/Controller/Api/FaqController.php \u2192 update() PUT /api/v4.0/faq\n Missing: userHasPermission(PermissionType::FAQ_EDIT)\n Any API token holder can update any FAQ entry regardless of user role.\n\n4. src/phpMyFAQ/Controller/Api/QuestionController.php \u2192 create() POST /api/v4.0/question\n Missing: permission check\n Any API token holder can create questions regardless of user role.\n\n## Root Cause\n\nAll 4 methods only call:\n $this-\u003ehasValidToken(); \u2190 shared API key, not per-user\n\nThe fixed BackupController correctly calls:\n $this-\u003euserHasPermission(PermissionType::BACKUP); \n\nPermissionType::CATEGORY_ADD, FAQ_ADD, FAQ_EDIT all exist in src/phpMyFAQ/Enums/PermissionType.php \u2014 they just are not being used.\n\n## Fix\n\nAdd userHasPermission() before the logic in each method:\n\n // CategoryController.create()\n $this-\u003euserHasPermission(PermissionType::CATEGORY_ADD);\n\n // FaqController.create()\n $this-\u003euserHasPermission(PermissionType::FAQ_ADD);\n\n // FaqController.update()\n $this-\u003euserHasPermission(PermissionType::FAQ_EDIT);\n\n## Reporter\n\nCONTACT\nSanthoshini Ganta\nGithub:@santhoshinipayload\nEmail: santhoshinive75@gmail.com\nLinkedIn: http://linkedin.com/in/santhoshini-g-1440621ba",
"id": "GHSA-8c6h-7g6x-m5x4",
"modified": "2026-06-23T22:27:34Z",
"published": "2026-06-23T22:27:34Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/thorsten/phpMyFAQ/security/advisories/GHSA-8c6h-7g6x-m5x4"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-49205"
},
{
"type": "WEB",
"url": "https://github.com/thorsten/phpMyFAQ/commit/d5c195b1ecf5dc30fb825d7eb50d22481c24cb07"
},
{
"type": "PACKAGE",
"url": "https://github.com/thorsten/phpMyFAQ"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N",
"type": "CVSS_V3"
}
],
"summary": "phpMyFAQ: Missing userHasPermission() in 4 API write endpoints (CVE-2026-24421 Incomplete Fix)"
}
Sightings
| Author | Source | Type | Date | Other |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.