/

CVE-2026-111907

Severity:

HIGH RISK

(7.1)

CSRF (CWE-352) in phpMyFAQ Database Migration API Endpoint

CVE-2026-111907

Deferred

Vulnerability type

Category:

Cross-Site Request Forgery

CWE:

CWE-352

Impact:

Unauthorized database migration and potential integrity or availability impact

Severity:

HIGH RISK

(7.1)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

phpMyFAQ contains a cross-site request forgery vulnerability in the administrative database migration endpoint because requests are processed without validating a CSRF token. If a logged-in user with the required configuration permission visits attacker-controlled content, a browser may be induced to submit a migration request that affects database integrity or availability.

phpMyFAQ contains a cross-site request forgery vulnerability in the administrative database migration endpoint because requests are processed without validating a CSRF token. If a logged-in user with the required configuration permission visits attacker-controlled content, a browser may be induced to submit a migration request that affects database integrity or availability.

Affected context

The issue occurs in phpMyFAQ administrative deployments where the POST /admin/api/update-database endpoint can be reached by an authenticated user holding the CONFIGURATION_EDIT permission. Risk depends on whether the application relies on ambient browser authentication and whether the endpoint performs state-changing database operations without an application-validated anti-CSRF control.

The issue occurs in phpMyFAQ administrative deployments where the POST /admin/api/update-database endpoint can be reached by an authenticated user holding the CONFIGURATION_EDIT permission. Risk depends on whether the application relies on ambient browser authentication and whether the endpoint performs state-changing database operations without an application-validated anti-CSRF control.

Exploit preconditions

  • Attack surface: The administrative HTTP POST endpoint for database updates
  • Required access: A victim must be authenticated and have the CONFIGURATION_EDIT permission
  • Trigger point: A cross-site request targeting the database migration operation
  • Why exploitation is possible: The endpoint accepts a state-changing request without validating a request-specific CSRF token
  • User condition: The victim generally must visit or interact with attacker-controlled content while the authenticated session remains usable
  • Attack surface: The administrative HTTP POST endpoint for database updates
  • Required access: A victim must be authenticated and have the CONFIGURATION_EDIT permission
  • Trigger point: A cross-site request targeting the database migration operation
  • Why exploitation is possible: The endpoint accepts a state-changing request without validating a request-specific CSRF token
  • User condition: The victim generally must visit or interact with attacker-controlled content while the authenticated session remains usable

Why this happens

The underlying bug is a missing request-origin and intent validation control on a state-changing administrative action. Because the endpoint does not require a valid CSRF token tied to the user's session or request context, a browser may automatically attach authentication information to a request initiated by another site. This behavior maps to CWE-352, Cross-Site Request Forgery.

The underlying bug is a missing request-origin and intent validation control on a state-changing administrative action. Because the endpoint does not require a valid CSRF token tied to the user's session or request context, a browser may automatically attach authentication information to a request initiated by another site. This behavior maps to CWE-352, Cross-Site Request Forgery.

Potential impact

  • An attacker may trigger database migrations without the administrator's deliberate intent.
  • Database integrity could be altered or migration state could become inconsistent.
  • The service may experience degraded availability if a migration fails or causes operational disruption.
  • Administrative actions performed through the victim's session could complicate recovery and auditing.
  • An attacker may trigger database migrations without the administrator's deliberate intent.
  • Database integrity could be altered or migration state could become inconsistent.
  • The service may experience degraded availability if a migration fails or causes operational disruption.
  • Administrative actions performed through the victim's session could complicate recovery and auditing.

General mitigation guidance

Mitigation generally focuses on requiring explicit proof of request intent

for every state-changing administrative operation.

Common defensive patterns include:

  • Enforcing unpredictable, session-bound CSRF tokens on the endpoint.
  • Applying the same CSRF protections consistently to all administrative POST actions.
  • Validating request origin or site context as an additional defense-in-depth control.
  • Avoiding state changes through cross-site navigations and requiring appropriate request methods.
  • Limiting database migration permissions and administrative privileges to the smallest necessary scope.
  • Using clear reauthentication or confirmation controls for high-impact maintenance operations.
  • Keeping administrative interfaces isolated from untrusted browsing contexts where practical.

Mitigation generally focuses on requiring explicit proof of request intent

for every state-changing administrative operation.

Common defensive patterns include:

  • Enforcing unpredictable, session-bound CSRF tokens on the endpoint.
  • Applying the same CSRF protections consistently to all administrative POST actions.
  • Validating request origin or site context as an additional defense-in-depth control.
  • Avoiding state changes through cross-site navigations and requiring appropriate request methods.
  • Limiting database migration permissions and administrative privileges to the smallest necessary scope.
  • Using clear reauthentication or confirmation controls for high-impact maintenance operations.
  • Keeping administrative interfaces isolated from untrusted browsing contexts where practical.

How teams detect issues like this

Detection approaches can include:

  • Static analysis and code review checks for state-changing routes that lack CSRF middleware or token validation.
  • Reviewing administrative POST handlers for reliance solely on cookies or other ambient authentication.
  • Testing whether requests without valid CSRF tokens are rejected consistently.
  • Enforcing framework and API security policies requiring anti-CSRF controls for browser-authenticated state changes.
  • Monitoring audit logs for unexpected database migration requests, unusual referrers, or actions outside normal maintenance windows.
  • Using automated security review tools to identify missing CSRF protections in controller and routing code.

Detection approaches can include:

  • Static analysis and code review checks for state-changing routes that lack CSRF middleware or token validation.
  • Reviewing administrative POST handlers for reliance solely on cookies or other ambient authentication.
  • Testing whether requests without valid CSRF tokens are rejected consistently.
  • Enforcing framework and API security policies requiring anti-CSRF controls for browser-authenticated state changes.
  • Monitoring audit logs for unexpected database migration requests, unusual referrers, or actions outside normal maintenance windows.
  • Using automated security review tools to identify missing CSRF protections in controller and routing code.

Sources

SourceLink
github.comgithub.com/thorsten/phpMyFAQ/security/advisories/GHSA-6x9g-rfx8-g42q
vulncheck.comvulncheck.com/advisories/phpmyfaq-4.0.0-before-4.1.9-csrf-via-admin-api-update-database

Frequently asked

questions

It can be triggered through a remote cross-site request when an authenticated

user with the required permission is induced to visit attacker-controlled

content. It does not generally provide direct unauthenticated access to the

endpoint.

The attacker typically needs a way to cause a privileged, logged-in user's

browser to submit the request. The victim's active session and

CONFIGURATION_EDIT permission are important prerequisites.

Require a valid, session-bound CSRF token for the database migration endpoint

and reject requests that fail token and appropriate origin-context checks.

Apply centralized CSRF protections to all browser-authenticated state-changing

routes, review privileged endpoints during code review, minimize administrative

permissions, and test that missing or invalid tokens cannot cause state

changes.

It can be triggered through a remote cross-site request when an authenticated

user with the required permission is induced to visit attacker-controlled

content. It does not generally provide direct unauthenticated access to the

endpoint.

The attacker typically needs a way to cause a privileged, logged-in user's

browser to submit the request. The victim's active session and

CONFIGURATION_EDIT permission are important prerequisites.

Require a valid, session-bound CSRF token for the database migration endpoint

and reject requests that fail token and appropriate origin-context checks.

Apply centralized CSRF protections to all browser-authenticated state-changing

routes, review privileged endpoints during code review, minimize administrative

permissions, and test that missing or invalid tokens cannot cause state

changes.

Find out what's already
exploitable in your codebase.