/

CVE-2026-76205

Severity:

HIGH RISK

(8.1)

SQL Injection (CWE-89) in phpMyFAQ Glossary Endpoints

CVE-2026-76205

Analyzed

Vulnerability type

Category:

SQL Injection

CWE:

CWE-89

Impact:

Unauthorized Database Access and Information Disclosure

Severity:

HIGH RISK

(8.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 before 4.1.7 contains a SQL injection vulnerability in glossary creation and update endpoints. An authenticated user with glossary add or edit permissions may manipulate crafted input to alter the SQL statement and read sensitive information from the database.

Affected context

The vulnerability occurs in phpMyFAQ glossary create and update functionality when user-controlled input is escaped, truncated, and then embedded into a SQL string literal. Deployments are at greater risk when authenticated users can access glossary management features and the application database account has broad read privileges.

Exploit preconditions

  • Attack surface: Authenticated glossary creation and update endpoints
  • Required access: A valid account with glossary add or edit permissions
  • Trigger point: Processing and persistence of glossary input
  • Why exploitation is possible: Input is transformed in a way that can invalidate escaping before it is inserted into a SQL literal, allowing database query structure to be altered

Why this happens

The underlying bug is an unsafe construction of SQL statements from user-controlled input. Escaping is applied before the value is truncated, so the resulting string may no longer preserve the escaping guarantees required by the SQL parser. Embedding that value directly into a query allows input to change query semantics, mapping to CWE-89: Improper Neutralization of Special Elements used in an SQL Command (SQL Injection).

Potential impact

  • An attacker may read sensitive database information
  • Confidential application records could be disclosed
  • Database queries may be altered beyond their intended operation
  • Data integrity could be affected if broader database privileges are available
  • Compromised database information could support further attacks

General mitigation guidance

Mitigation generally focuses on removing string-based SQL construction for user-controlled values and reducing database trust.

Common defensive patterns include:

  • Use parameterized queries or prepared statements for all dynamic values
  • Apply validation and length handling before binding values to database parameters
  • Treat escaping as a secondary defense rather than a substitute for parameterization
  • Restrict database accounts to the minimum required privileges
  • Centralize database access patterns and enforce secure query policies
  • Avoid exposing detailed database errors to authenticated users

How teams detect issues like this

Detection approaches commonly include:

  • Static analysis rules identifying SQL strings built through concatenation or interpolation
  • Code review checks for escaping followed by truncation or other transformations
  • Testing that verifies all glossary inputs are passed through parameterized query interfaces
  • Runtime monitoring for anomalous database errors, query patterns, or excessive data reads
  • Policy enforcement requiring prepared statements in database access layers

Automated security review tools may help identify unsafe query construction, but findings should be validated against the application's database abstraction layer.

Sources

SourceLink
github.comgithub.com/thorsten/phpMyFAQ/security/advisories/GHSA-79h3-6hxj-g98h
vulncheck.comvulncheck.com/advisories/phpmyfaq-before-sql-injection-via-glossary

Frequently asked

questions

Exploitation generally requires authentication and a role with permission to create or edit glossary entries. Unprivileged anonymous users may not be able to reach the vulnerable functionality.

The attacker needs a valid phpMyFAQ account with glossary add or edit permissions, along with access to the affected endpoints.

Replace dynamically assembled SQL statements with parameterized queries, and perform validation and length handling before values are bound.

Enforce prepared statements through shared database APIs, review transformations applied to user input, restrict database privileges, and include SQL injection testing in CI and security reviews.

Find out what's already
exploitable in your codebase.