Andreas Wolter
  • Consulting & Services
    • SQL Server Security Assessment by Andreas Wolter
    • SQL Server Health Check
    • Performance Analysis
    • SQL Server Discovery
    • Air-Gapped SQL Server
  • My Customers
  • About
    • Conferences
    • Certifications
    • Training
  • Blog
  • Contact
  • Click to open the search input field Click to open the search input field Search
  • Menu Menu

Bug in Auditing allows for undetected Data Exfiltration by low privileged user

Bug in Auditing allows for undetected Data Exfiltration by low privileged user

Last week, I was contacted by an IT Leader from Saudi-Arabia who previously found several CVE’s in Oracle and Microsoft SQL Server. He wanted my opinion on a newly discovered security issue in SQL Server Auditing.

Interestingly, his findings directly overlap with a topic I wrote about just last month: Using Data Classification to Audit Data Access.

Emad Al-Mousa identified two vulnerabilities in the SENSITIVE_BATCH_COMPLETED Audit Action Group. Microsoft Security Response Center (MSRC) acknowledged the issue but classified it as low priority – meaning it may not be addressed until a major release, if at all.

That assessment really piqued my curiosity – I wanted to test it firsthand and see what the real-world consequences might be.
Using my test setup with a table containing credit card information labeled as Highly Confidential and other Financial data using SQL Server’s Data Classification technology, I was able to reproduce the bug easily.

And yes – it’s a genuine security gap.

Any user with basic SELECT access to an audited table can bypass the auditing mechanism with trivial ease. Honestly, it’s surprising this slipped past automated testing, which should catch such cases by default.

The repro is as simple as this:

  • Create an Audit Specification at the database or server level using SENSITIVE_BATCH_COMPLETED_GROUP (as I previously described in How to Use Data Classification to Audit specific Data Access in Microsoft SQL Server ).
  • With nothing more than db_datareader or SELECT permissions, run:

Select Into new temporary table

Neither the SELECT INTO operation nor queries against the new table generate audit entries.

This means anyone with table access could exfiltrate sensitive data without detection. Even worse, the documentation explicitly claims this command is covered by the Audit Action Group.

Books Online Data Classification screenshot

Screenshot from: Data Discovery & Classification

The same loophole applies to the second vulnerability Emad discovered, involving DBCC CLONEDATABASE.

What does this mean for you?

Until Microsoft revises MSRC’s assessment and fixes SENSITIVE_BATCH_COMPLETED_GROUP, you cannot rely on it for auditing sensitive data access.

In the meantime:

  • Audit ALL SELECT operations (this covers SELECT INTO).
  • Enable auditing for DBCC_GROUP (which I generally recommend as best practice: Recommendation for Security Auditing for databases – with example for Microsoft SQL Server).

If you want to see this issue prioritized, I encourage you to comment on and re-share this post – or better yet, add your voice on LinkedIn.

Thank you for helping spread the word.

I have informed both the Microsoft SQL Server Auditing and Data Classification teams about this publication beforehand, and I have been told that they are going to fix it.

A big thank-you to Emad Al-Mousa for identifying and responsibly disclosing the issue. You can read his full write-up here: SQL Server Security Auditing Vulnerability For SENSITIVE BATCH COMPLETED Policy
And thank you to my ex-colleague Rohit Nayak for helping review this post.

Andreas

Does your SQL Server auditing capture what you need for security and compliance? SQL Server Audit has its limits and gaps, too. We set up auditing and activity monitoring tailored to your requirements, including archiving, storage and clear reports.

Explore Auditing & Activity Monitoring
Share article
  • Share on Facebook
  • Share on X
  • Share on LinkedIn
0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Security Assessment Community Edition

Learn about my free Community Edition script.

Recent
  • Sample result in SSMS: local NTLM connections over shared memory from SQL01, and NTLM connections over TCP from a reporting server, an ETL server and a workstation
    NTLM Deprecation and SQL Server: How to Find NTLM Connections...18. November 2026 - 17:01in: Security
  • SQL Server Consolidation: $3M+ in Projected Savings and...30. September 2026 - 15:47in: Architecture & High Availability, Security
  • Using a Database Server as a Honeypot for Threat Detect...18. September 2026 - 16:00in: Security
  • Azure Arc for SQL Server: “Least Privilege” Mode Still...8. September 2026 - 15:56in: Security
  • When SIEM Enrichment Becomes False Attribution3. September 2026 - 14:26in: Security
Comments
  • Thanks Scott. Goof feedback. NETSTAT is a useful addition,...21. November 2026 - 15:44 by Andreas Wolter
  • I would go a little deeper with how to troubleshoot SQL...21. November 2026 - 15:15 by Scott O
  • Protecting database data at rest is essential for maintaining...21. October 2026 - 2:23 by Viska
  • Thanks Now Microsoft could document them as well, and put...19. August 2026 - 16:26 by Andreas Wolter
  • List of Action_IDs for Filter https://sqlquantumleap.com/reference/server-audit-filter-values-for-action_id/ Great...18. August 2026 - 0:59 by Peter Dünsch

Articles

Analysis Services Auditing Availability Groups Azure Best Practices Certification Columnstore Consolidation Deadlocks & Blocking Encryption Extended Events Get-SqlSafe In-Memory OLTP Indexing Least Privilege PASS Summit Patching Performance Analysis Permissions Privilege Escalation Reporting Services Security Principles Spatial Data SQLBits SQL Injection SQLSaturday SQL Server 2012 SQL Server 2014 SQL Server 2016 SQL Server 2022 SQL Server 2025 SQL Trace & Profiler sysadmin & Server Roles Threat Detection Vulnerabilities Workshop & PreCon
© 2026 Andreas WolterContactImprintPrivacy PolicyLinkedInRSS
Link to: How to Use Data Classification to Audit specific Data Access in SQL Server Link to: How to Use Data Classification to Audit specific Data Access in SQL Server How to Use Data Classification to Audit specific Data Access in SQL Serverclassifying table columns in SQL Server Link to: Evading Data Access Auditing in Microsoft SQL Server – special commands – and how to close the gaps Link to: Evading Data Access Auditing in Microsoft SQL Server – special commands – and how to close the gaps Evading Data Access Auditing in Microsoft SQL Server – special commands –...
Scroll to top Scroll to top Scroll to top
Manage Consent
To provide the best experiences, we use technologies like cookies to store and/or access device information. Consenting to these technologies will allow us to process data such as browsing behavior or unique IDs on this site. Not consenting or withdrawing consent, may adversely affect certain features and functions.
Functional Always active
The technical storage or access is strictly necessary for the legitimate purpose of enabling the use of a specific service explicitly requested by the subscriber or user, or for the sole purpose of carrying out the transmission of a communication over an electronic communications network.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
The technical storage or access that is used exclusively for statistical purposes. The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
The technical storage or access is required to create user profiles to send advertising, or to track the user on a website or across several websites for similar marketing purposes.
  • Manage options
  • Manage services
  • Manage {vendor_count} vendors
  • Read more about these purposes
View preferences
  • {title}
  • {title}
  • {title}