{"id":"CVE-2026-49205","aliases":["CVE-2026-49205","GHSA-8c6h-7g6x-m5x4"],"related":[],"kind":"vulnerability","state":"published","title":"phpMyFAQ: Missing userHasPermission() in 4 API write endpoints (CVE-2026-24421 Incomplete Fix)","summary":"phpMyFAQ is an open source FAQ web application. Versions prior to  4.1.4 have Missing Authorization in the API CategoryController. CVE-2026-24421 addressed this in the 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, rather than the individual user's role permissions. The following APIs are affected: POST /api/v4.0/category (CategoryController::create), POST /api/v4.0/faq (FaqController::create), PUT /api/v4.0/faq (FaqController::update), and POST /api/v4.0/question (QuestionController::create). This issue has been fixed in version 4.1.4.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"phpMyFAQ is an open source FAQ web application. Versions prior to  4.1.4 have Missing Authorization in the API CategoryController. CVE-2026-24421 addressed this in the 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, rather than the individual user's role permissions. The following APIs are affected: POST /api/v4.0/category (CategoryController::create), POST /api/v4.0/faq (FaqController::create), PUT /api/v4.0/faq (FaqController::update), and POST /api/v4.0/question (QuestionController::create). This issue has been fixed in version 4.1.4.","source":"cvelist"},{"lang":"en","text":"Missing 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.\n\n## Summary\n\nCVE-2026-24421 fixed BackupController by adding: $this->userHasPermission(PermissionType::BACKUP);\n\nThe 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.\n\n## Affected Endpoints\n\n1. src/phpMyFAQ/Controller/Api/CategoryController.php → 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 → 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 → 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 → 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->hasValidToken();   ← shared API key, not per-user\n\nThe fixed BackupController correctly calls:\n    $this->userHasPermission(PermissionType::BACKUP);  \n\nPermissionType::CATEGORY_ADD, FAQ_ADD, FAQ_EDIT all exist in src/phpMyFAQ/Enums/PermissionType.php — they just are not being used.\n\n## Fix\n\nAdd userHasPermission() before the logic in each method:\n\n    // CategoryController.create()\n    $this->userHasPermission(PermissionType::CATEGORY_ADD);\n\n    // FaqController.create()\n    $this->userHasPermission(PermissionType::FAQ_ADD);\n\n    // FaqController.update()\n    $this->userHasPermission(PermissionType::FAQ_EDIT);\n\n## Reporter\n\nCONTACT\nSanthoshini Ganta\nGithub:@santhoshinipayload\nEmail: santhoshinive75@gmail.com\nLinkedIn: http://linkedin.com/in/santhoshini-g-1440621ba","format":"markdown","source":"ghsa"},{"lang":"es","text":"phpMyFAQ es una aplicación web de preguntas frecuentes de código abierto. Las versiones anteriores a la 4.1.4 tienen una autorización faltante en el CategoryController de la API. CVE-2026-24421 abordó esto en el BackupController añadiendo: $this  ->  userHasPermission(PermissionType::BACKUP). La misma corrección no se aplicó a otros 4 endpoints de escritura en la API pública. Los 4 solo llaman a $this  ->  hasValidToken() - que verifica un encabezado de clave API compartido, en lugar de los permisos de rol del usuario individual. Las siguientes APIs están afectadas: POST /api/v4.0/category (CategoryController::create), POST /api/v4.0/faq (FaqController::create), PUT /api/v4.0/faq (FaqController::update), y POST /api/v4.0/question (QuestionController::create). Este problema ha sido solucionado en la versión 4.1.4.","source":"nvd"}],"published":"2026-06-18T21:12:34.764Z","modified":"2026-10-26T11:10:00.157Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N","score":6.5,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N","score":6.5,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N","score":6.5,"rating":"MEDIUM"}],"cwes":["CWE-862"],"affected":[{"ranges":[{"version":"< 4.1.4","status":"affected"}],"vendor":"thorsten","product":"phpMyFAQ","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"4.1.4"}],"ecosystem":"Packagist","package":"thorsten/phpmyfaq","purl":"pkg:composer/thorsten/phpmyfaq","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"4.1.4"}],"ecosystem":"Packagist","package":"phpmyfaq/phpmyfaq","purl":"pkg:composer/phpmyfaq/phpmyfaq","source":"ghsa"}],"references":[{"url":"https://github.com/thorsten/phpMyFAQ/security/advisories/GHSA-8c6h-7g6x-m5x4","tags":["web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/thorsten/phpMyFAQ/commit/d5c195b1ecf5dc30fb825d7eb50d22481c24cb07","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-49205","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/thorsten/phpMyFAQ","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-06-22T14:43:51.674Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-49205","url":"https://www.cve.org/CVERecord?id=CVE-2026-49205","licence":"CVE Terms of Use","modified":"2026-06-22T14:44:03.047Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-8c6h-7g6x-m5x4","url":"https://github.com/advisories/GHSA-8c6h-7g6x-m5x4","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:48.974Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-49205","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-49205","licence":"Public domain","modified":"2026-10-26T11:10:00.157Z"}],"updatedAt":"2026-11-25T22:59:25.179Z","epss":{"score":0.0024,"percentile":0.162,"date":"2026-12-01T12:00:22.000Z"}}