Skip to content

Commit 91c87ec

Browse files
1 parent 8b70da9 commit 91c87ec

1 file changed

Lines changed: 84 additions & 0 deletions

File tree

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
{
2+
"schema_version": "1.4.0",
3+
"id": "GHSA-8c6h-7g6x-m5x4",
4+
"modified": "2026-06-23T22:27:34Z",
5+
"published": "2026-06-23T22:27:34Z",
6+
"aliases": [
7+
"CVE-2026-49205"
8+
],
9+
"summary": "phpMyFAQ: Missing userHasPermission() in 4 API write endpoints (CVE-2026-24421 Incomplete Fix)",
10+
"details": "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",
11+
"severity": [
12+
{
13+
"type": "CVSS_V3",
14+
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N"
15+
}
16+
],
17+
"affected": [
18+
{
19+
"package": {
20+
"ecosystem": "Packagist",
21+
"name": "thorsten/phpmyfaq"
22+
},
23+
"ranges": [
24+
{
25+
"type": "ECOSYSTEM",
26+
"events": [
27+
{
28+
"introduced": "0"
29+
},
30+
{
31+
"fixed": "4.1.4"
32+
}
33+
]
34+
}
35+
]
36+
},
37+
{
38+
"package": {
39+
"ecosystem": "Packagist",
40+
"name": "phpmyfaq/phpmyfaq"
41+
},
42+
"ranges": [
43+
{
44+
"type": "ECOSYSTEM",
45+
"events": [
46+
{
47+
"introduced": "0"
48+
},
49+
{
50+
"fixed": "4.1.4"
51+
}
52+
]
53+
}
54+
]
55+
}
56+
],
57+
"references": [
58+
{
59+
"type": "WEB",
60+
"url": "https://github.com/thorsten/phpMyFAQ/security/advisories/GHSA-8c6h-7g6x-m5x4"
61+
},
62+
{
63+
"type": "ADVISORY",
64+
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-49205"
65+
},
66+
{
67+
"type": "WEB",
68+
"url": "https://github.com/thorsten/phpMyFAQ/commit/d5c195b1ecf5dc30fb825d7eb50d22481c24cb07"
69+
},
70+
{
71+
"type": "PACKAGE",
72+
"url": "https://github.com/thorsten/phpMyFAQ"
73+
}
74+
],
75+
"database_specific": {
76+
"cwe_ids": [
77+
"CWE-862"
78+
],
79+
"severity": "MODERATE",
80+
"github_reviewed": true,
81+
"github_reviewed_at": "2026-06-23T22:27:34Z",
82+
"nvd_published_at": "2026-06-18T22:16:31Z"
83+
}
84+
}

0 commit comments

Comments
 (0)