SQL InjectionWeakness · CWE-89

CVE-2026-58492

CRITICAL · 9.2 CVSS v4.0 Published 2026-07-10
Patch available
A vendor patch is available. No clean upgrade release — apply the published patch.
See remediation →
100/100
Remediation priority · Urgent
Remotely reachable No privileges Zero-click Patch available 6 weeks old

Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.

NVD · unedited
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.

Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.

dbcve analysis · high confidence

The grav-plugin-database plugin versions before 1.2.0 contain a SQL injection vulnerability in the PDO::tableExists method. The method directly interpolates its table argument into a raw SQL query string without any sanitization, escaping, quoting, or whitelisting, allowing attacker-controlled table names to execute arbitrary SQL against the database.

MitigationUpgrade to grav-plugin-database version 1.2.0 or later. If immediate patching is not possible, implement strict input validation and whitelist-based sanitization for all table name parameters passed to the plugin.

Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.

CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.

From the vector
Attack vector
Network
Complexity
Low
Privileges
None
Authentication
X
User interaction
None
Scope
X

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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X

Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.

dbcve checks

Work through these to decide whether this CVE applies to you.

  1. Locate the grav-plugin-database plugin
    Check your Grav CMS installation for the presence of the /user/plugins/database/ directory. In a typical Grav setup, navigate to the root directory and run: ls -la user/plugins/ | grep database
    Affected if The database plugin directory exists and the plugin is installed
  2. Determine the installed plugin version
    Open the plugin's manifest file at user/plugins/database/blueprints.yaml or user/plugins/database/plugin.yaml and locate the version field. Alternatively, check for a composer.json file in that directory and read the version entry.
    Affected if The version listed is lower than 1.2.0 (for example, 1.1.0, 1.0.5, etc.)
  3. Identify usage of the tableExists method
    Search the plugin source code for calls to the tableExists method: grep -r "tableExists" user/plugins/database/. Review any PHP files that invoke this method to determine if table names are passed from user input (request parameters, form submissions, or URL arguments).
    Affected if The tableExists method is called with user-supplied or unsanitized table name parameters in the application code
  4. Check if the database plugin is enabled
    Inspect your Grav CMS configuration file at user/config/system.yaml or check the plugin status via the Grav Admin panel under the Plugins section. Look for an entry under plugins.database.enabled.
    Affected if The plugin is enabled (enabled: true) in the configuration
  5. Verify database connection configuration
    Examine the database plugin configuration file at user/plugins/database/database.yaml or check the Grav system configuration for database credentials. Confirm that the plugin connects to a database that could be impacted by SQL injection.
    Affected if The plugin is configured with active database credentials and connects to a database (SQLite, MySQL, or PostgreSQL)

Your environment is affected if the grav-plugin-database plugin is installed, enabled, running a version before 1.2.0, and the tableExists method can be invoked with user-controlled table name input.

Generated from the published advisory. Verify against your own configuration.

Check your environment

Paste your version and any relevant configuration and it will be compared against the affected criteria above. Do not include secrets or credentials.

AI-assisted, checked against the advisory. Informational, not a guarantee.

Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.

dbcve · scoped
Patch available Apply the vendor patch
Vendor patch github.com →
Interim mitigation

Upgrade to grav-plugin-database version 1.2.0 or later. If immediate patching is not possible, implement strict input validation and whitelist-based sanitization for all table name parameters passed to the plugin.

Recommended fix High confidence

grav-plugin-database version 1.2.0

  1. Identify the current version of grav-plugin-database in your Grav CMS installation
  2. Upgrade grav-plugin-database to version 1.2.0 or later
  3. Verify the upgrade was successful by checking the plugin version

Generated from the published advisory — verify against the referenced sources before acting.

Have this fixed Scoped from the published advisory
  • Consultation2.0 h
  • Implementation4.0 h
  • Testing3.0 h
  • Review / QA1.0 h
10.0 hours of engineering $1,750
Get the patch applied

An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $2,800.

Scan for this in your stack

Free · runs locally
dbcve dependency scanner

Check whether your project pulls in CVE-2026-58492 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.

References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.

Primary sources

Practitioner notes

Contributed

Peer-ranked notes from engineers who’ve handled CVE-2026-58492 in production — separate from our analysis above.

No notes yet

Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.

What this is

A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.

What belongs here
  • Verified mitigations, workarounds, and config changes
  • Version or environment caveats, and links to real fixes
  • No weaponised exploit code, or anything meant to cause harm
  • No spam, self-promotion, credentials, or personal data