
Normal and compromised applications can use the same existing database access.
Let us assume a customer-facing support application. It can be a simple web server serving data from a database. To achieve this, the database role used by the application will have the permissions to read customer records. The application itself might have an authentication and authorization mechanism to give users access to its various APIs. However, an attacker controlling the process might be able to make use of those existing permissions without any administrator login or new grant.
The recent PHP vulnerabilities described by Calif Research illustrate how an unauthenticated attacker can compromise a PHP runtime. Calif’s discovery write-up describes the timeline and technical details. The fixes released on October 21, 2026 for CVE-2026-109618 and CVE-2026-109619 address runtime memory-safety flaws. They address incorrect handling of out-of-memory and other fatal errors during request processing and cleanup. These flaws could allow process-memory disclosure and remote code execution under the affected conditions. As per the PHP advisory, affected operators were asked to update and check vendor backports.
In a hypothetical extension of that scenario, an attacker controlling the application process could use its database identity within the permissions already granted to it. That makes application database activity relevant to the investigation.

A compromised worker may reuse an open session within its existing grants.
Identity type (human or non-human) and privilege level are separate. A monitoring policy that prioritizes administrator and human sessions can leave application reads under-examined. Service accounts can be privileged, and even a SELECT operation can expose sensitive records. An attacker controlling the worker may be able to issue additional statements through a connection available to that process, subject to the database role’s permissions. In a way, it can be considered “simpler” for the attacker as they may not need a separate database credential anymore.
An already established session can carry new statements. PHP persistent connections provide one documented way of reuse. The actual availability depends on the execution mode and runtime conditions.
Monitoring logins, grants and DBA sessions alone cannot account for reads from an existing application session. In addition to privileged monitoring, one should also track application/job activity depending on the sensitivity of the data.
The evidence furnished by the tool should be actionable enough to identify and diagnose potential issues. It should have at least the following components:
Now, it must be stated that the statement evidence does not prove data exfiltration on its own. Familiar query shapes within threshold volumes may not trigger a behavioral anomaly alert. Query counts can also be misleading. Large counts don’t always indicate distinct records read, while multiple smaller reads can exfiltrate a large amount of data. Workload identity helps define a useful baseline, but may still be insufficient to distinguish malicious reads from ordinary activity. We talk about this more in our article on runtime identity attribution.

Connect database reads to workload and request context where available.
You don’t need to reproduce the actual exploit to test out the coverage of your monitoring system. Start with a sandboxed staging environment and synthetic customer records.

Test reads, attribution and denials with synthetic data.
For each case, evaluate whether an event arrived, what could be attributed, whether an alert fired and the delay. Check collector health, dropped events, retention and redaction without unnecessarily logging raw values.
Database monitoring provides useful evidence alongside patching, least privilege and access enforcement. Review and patch vulnerabilities regularly, and prioritize critical fixes according to exposure and severity. Least privilege patterns across entities help in reducing fallout of breaches. Passive monitoring provides evidence but it cannot block a query. Access control policies implemented via permissions or by a context-aware enforcement layer can help here.
Database query monitoring alone cannot show a later leak from data already cached in application memory. It also cannot (by default) capture human context which is not propagated via an application. A degree of instrumentation or context propagation, such as query tagging, is usually needed to associate a query with an upstream user or request.
Despite this, monitoring application queries on databases serves an important purpose in investigating compromised applications and assessing the impact of the compromise.
USA
AURVA INC. 1241 Cortez Drive, Sunnyvale, CA, USA - 94086
India
Aurva, 4th Floor, 2316, 16th Cross, 27th Main Road, HSR Layout, Bengaluru – 560102, Karnataka, India
Platform
Solutions
Resources
Resource Library
Company
USA
AURVA INC. 1241 Cortez Drive, Sunnyvale, CA, USA - 94086
India
Aurva, 4th Floor, 2316, 16th Cross, 27th Main Road, HSR Layout, Bengaluru – 560102, Karnataka, India
Platform
Solutions
Resources
Resource Library
Company
USA
AURVA INC. 1241 Cortez Drive, Sunnyvale, CA, USA - 94086
India
Aurva, 4th Floor, 2316, 16th Cross, 27th Main Road, HSR Layout, Bengaluru – 560102, Karnataka, India
Platform
Solutions
Resources
Resource Library
Company