Vulnerability assessment reports sometimes state: "Indicators of SQL injection are present, but because error messages and search results are not displayed on screen, data theft risk is limited."
Many teams have used this sentence to deprioritize fixes. The reasoning that if nothing appears on screen, attackers cannot read the contents either sounds intuitive on the surface.
However, there is an attack pattern where this premise collapses. The attacker does not read application responses. Instead, they force the database server itself to initiate network connections to an attacker-controlled server. The data rides along with that outbound traffic. Throughout the entire process, nothing appears on screen.
Exfiltrating data without reading responses
SQL injection can be divided into three categories based on how results are exfiltrated.
| Type | Data retrieval method | On-screen visibility |
|---|---|---|
| In-band (classic) | Displayed mixed into search results or error messages | Appears in output |
| Blind | Inferred character by character via conditional true/false or response delays | Does not appear in output |
| Out-of-band | DB server initiates outbound connections and attaches data to the traffic | Does not appear in output |
Assessments often classify risk as "limited" because they assume the second category, blind SQL injection. Blind SQL injection requires massive volumes of requests to infer strings character by character, making it noticeably slow and easy to detect. The appraisal that it is "theoretically possible but impractical" has valid grounds.
The third category changes the equation. When a DB server can establish outbound network connections, it can embed extracted strings into subdomains of an attacker-managed domain and trigger DNS resolution. The attacker simply monitors logs on their authoritative DNS server to read the exfiltrated content. Substantial chunks of data leave in a single request.
While the exact features vary across DBMS platforms, mechanisms capable of external communication exist in every major product. Common examples in this context include network packages like Oracle's UTL_HTTP, stored procedures referencing UNC paths in SQL Server, and file read functions on MySQL under Windows. What they share is that all of them are legitimate features originally designed for valid business purposes.

Why it bypasses upstream defenses
The reason this vector is overlooked is that the monitored direction differs from the direction of data exfiltration.
In most architectures, defenses concentrate heavily at inbound request perimeters. WAFs block suspicious patterns, and application logs track anomalous requests. On the outbound side, monitoring focuses almost exclusively on web server responses.
In out-of-band attacks, data never travels through web server responses. It exits directly from the DB server. No matter how rigorously you inspect web traffic, no trace remains there. Furthermore, the inbound request passing through the WAF may look like ordinary text parameters.
Moreover, DNS traffic is permitted unconditionally in many environments. While organizations often restrict outbound HTTP traffic, few block domain name resolution. Even when teams believe their DB server cannot access the internet, DNS alone frequently still passes through.
Verification order
These countermeasures are not novel; the execution order is what matters.
1. Eliminate raw values from SQL construction
Use placeholders (prepared statements) to prevent values from being concatenated directly into SQL statements. This is the fundamental fix; once implemented, subsequent layers serve as defense-in-depth insurance. Conduct a codebase-wide audit to ensure no string concatenation remains in SQL queries. Core concepts are detailed in Web Security Fundamentals.
2. Restrict DB execution privileges
Database accounts used by applications virtually never require privileges to execute functions that trigger external network communication. Revoking unnecessary privileges reduces attack surfaces even if an injection vulnerability exists. Because this only requires configuration adjustments, it offers exceptionally high ROI.
3. Restrict outbound egress from the DB server
While outbound traffic from application servers is often monitored, DB servers are frequently left unrestricted under the assumption that they are "internal." Verify whether the DB server has any operational need to reach the internet, and close access if it does not. For DNS, restrict queries to internal authoritative servers or local resolvers, blocking direct external lookup attempts.
4. Log blocked outbound connections
After blocking egress, maintain logs of rejected traffic. The appearance of blocked records itself serves as an indicator of compromise.
For interpreting assessment reports and prioritizing findings, refer to Vulnerability Assessment Guide for SMBs; for evaluation criteria covering external services, see Approaches to Security Evaluation.
Items to include in acceptance and maintenance contracts
When outsourcing development, this layer often falls into the category of "not done unless explicitly specified." Contractors may interpret verifying application logic according to specs as entirely separate from blocking database server egress.
Explicitly documenting these requirements prevents subsequent disputes.
- Use placeholders for all SQL construction, leaving zero instances of string concatenation
- Grant no execution privileges for network-capable functions to application database connection users
- Deny outbound egress (including DNS) from the DB server to the internet by default, allowing only explicitly required destinations
- Log denied outbound traffic and include it in regular maintenance monitoring
Explicitly specifying "including DNS" in the third requirement makes a substantial difference in implementation, as merely stating "restrict external traffic" typically results in blocking only HTTP and stopping there.
Performance acceptance criteria around slowness follow the same dynamic: if not written, acceptance testing will miss them. Reviewing Slow List Pages and Acceptance Criteria for N+1 Queries alongside this will help you organize comprehensive contractual requirements.
What to do next
Check whether external domain names can be resolved directly from your database server. If DNS resolution succeeds, an exfiltration pathway exists even for vulnerabilities that display nothing on screen.
Next, revisit past vulnerability assessment reports. If any findings were deferred because "nothing appears in output, making impact limited," that reasoning holds only if outbound egress from the database server is blocked. If egress is open, those items must be reprioritized.
GleamHub provides support for auditing existing system communication pathways and formalizing requirements for vendor contracts through our Development, AI, and Automation Consultations. Because viable measures vary based on your system architecture and operational setup, please consult with us individually. Feel free to reach out via Contact Us.







