Description
grav-plugin-database is the database plugin for Grav CMS. Prior to 1.2.0, the PDO::tableExists method interpolates its table argument directly into a raw SQL query string without sanitization, escaping, quoting, or whitelisting, allowing attacker-controlled table names passed by consuming plugin or developer code to execute arbitrary SQL against the configured database. This issue is fixed in version 1.2.0.
Published: 2026-07-10
Score: 9.2 Critical
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

The Grav CMS database plugin contains a flaw where the PDO::tableExists method interpolates the supplied table name directly into a raw SQL query string without any sanitization, escaping, quoting, or whitelisting. This omission permits an attacker to construct a malicious table name by a consuming plugin or custom code, resulting in arbitrary SQL execution against the configured database. The vulnerability is a classic SQL injection (CWE‑89) that or deleting database contents, potentially compromising the entire application’s data integrity and confidentiality. The CVSS base score of 9.2 indicates a critical severity, while the EPSS score of <1% shows a very low probability of current exploitation, yet the impact warrants prompt action.

Affected Systems

All installations of the Grav CMS database plugin older than version 1.2.0 are vulnerable. Users who rely on this plugin and whose consuming plugins or custom code supply table names to the DAO layer are at risk. The issue is resolved in the publicly released 1.2.0 version by the plugin author.

Risk and Exploitability

High risk due to the critical CVSS score of 9.2 and the complete lack of input sanitization. The EPSS score of <1% is not listed in the CISA KEV catalog. Attackers who can influence the table name parameter—such as through a malicious consuming plugin or developer code—can inject arbitrary SQL statements that run with the database user’s privileges. The exploit path requires only the ability to control the table name argument, with no additional complexity or configuration changes, making this weakness readily exploitable in vulnerable environments.

Generated by OpenCVE AI on July 29, 2026 at 10:36 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade the Grav CMS database plugin to version 1.2.0, which contains the security fix.
  • If an upgrade cannot be performed immediately, restrict the usage of PDO::tableExists to trusted code paths and avoid passing unsanitized table names.
  • Validate or whitelist any table names supplied from external or third‑party code before they are bound to PDO::tableExists.
  • Limit the privileges of the database account used by Grav to the minimum necessary to curtail potential damage from an injection.

Generated by OpenCVE AI on July 29, 2026 at 10:36 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Fri, 10 Jul 2026 18:15:00 +0000

Type Values Removed Values Added
First Time appeared Getgrav
Getgrav grav
Vendors & Products Getgrav
Getgrav grav

Fri, 10 Jul 2026 17:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Fri, 10 Jul 2026 16:30:00 +0000

Type Values Removed Values Added
Description grav-plugin-database is the database plugin for Grav CMS. Prior to 1.2.0, the PDO::tableExists method interpolates its table argument directly into a raw SQL query string without sanitization, escaping, quoting, or whitelisting, allowing attacker-controlled table names passed by consuming plugin or developer code to execute arbitrary SQL against the configured database. This issue is fixed in version 1.2.0.
Title grav-plugin-database: SQL Injection in PDO::tableExists() due to Unsanitized Table Name Interpolation
Weaknesses CWE-89
References
Metrics cvssV4_0

{'score': 9.2, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:L/SC:N/SI:N/SA:N'}


cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-07-10T16:48:28.515Z

Reserved: 2026-06-30T20:21:25.812Z

Link: CVE-2026-58492

cve-icon Vulnrichment

Updated: 2026-07-10T16:47:53.135Z

cve-icon NVD

No data.

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-07-29T10:45:03Z

Weaknesses
  • CWE-89

    Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')