On December 5, 2026, Simon Willison published a video introduction to Datasette Agent, an AI assistant that lets users analyze and explore data held in SQLite databases through natural-language prompts — including generating charts and annotations via Datasette Charts. A public preview is live at agent.datasette.io, gated only by GitHub authentication which, in the author's own words, exists "purely to discourage abuse."
This is genuinely impressive technology. It is also a security event your SOC needs to pay attention to. Datasette Agent represents a class of tooling that is proliferating across enterprises right now: LLM agents with direct query access to structured data stores. When a developer points one of these agents at a SQLite database containing customer records, HR exports, or application telemetry, the LLM — and whatever model provider sits behind it — now touches that data. When employees upload databases to a hosted preview instance, that data has left your perimeter entirely.
There is no CVE here and no active exploitation campaign. The threat is architectural: uncontrolled AI-to-database pathways, prompt injection against tool-using agents, and shadow AI deployments. This post breaks down the risk model and gives your team concrete detections and hardening guidance.
Technical Analysis
What Datasette Agent Actually Does
Datasette is an open-source tool for exploring and publishing SQLite databases over a web interface. Datasette Agent layers an LLM on top: the user asks a question in natural language, the agent generates and executes SQL against the attached database, interprets results, and iterates — sometimes dozens of queries per conversation. The demo also shows the agent driving Datasette Charts to build visualizations and add annotations.
Key architectural facts defenders need to internalize:
- The agent executes SQL autonomously. It has a tool that runs queries against the attached SQLite database. Anything reachable by that SQLite connection is within the agent's reach — including, if configured, attached databases via
ATTACH DATABASE, virtual tables, and SQLite extensions loaded into the process. - SQLite is a file format, not a server. "Connecting an AI to a SQLite database" means giving a process read access to a file that frequently contains entire application datasets — user tables, session data, cached API responses. There is no granular role-based access control inside the file.
- The preview instance is hosted. Signing in with GitHub "purely to discourage abuse" is rate-limiting, not a security boundary. Any database a user uploads to agent.datasette.io now resides on third-party infrastructure, and query contents transit an LLM provider's API.
- Prompt injection is the primary attack vector. Datasette's author has written extensively about this class of problem. If an agent executes SQL generated from instructions influenced by untrusted content — a malicious row value, a poisoned dataset, a crafted prompt — the agent becomes a confused deputy against the database.
Threat Scenarios Ranked by Likelihood
- Shadow AI data egress (high likelihood, happening now). An analyst exports a production SQLite dump and uploads it to the public preview instance to "quickly analyze it." Data classification, DPIA, and contractual obligations are bypassed in one click. This is the same exfiltration pattern we saw with early ChatGPT adoption, now with structured data.
- Prompt injection via data content. If an agent processes a database containing attacker-controlled strings (form submissions, log entries, scraped web data), embedded instructions can steer the agent's generated SQL — e.g., querying tables the user never asked about and surfacing results in a chart annotation or summary.
- Over-privileged self-hosted deployments. Teams deploying Datasette with the agent plugin against live databases without restricting SQLite to read-only mode, without disabling
ATTACH, or while loading extensions likehttporfsthat expand the blast radius beyond SELECT statements. - Exposed Datasette instances. Datasette binds to a port and serves JSON APIs. Internet-exposed instances — especially with the
?sql=arbitrary query parameter enabled — have historically been found via Shodan/Censys. Add an AI agent and the exposure now includes an autonomous query engine.
Exploitation Status
No CVE is associated with this announcement, no in-the-wild exploitation has been reported, and nothing here is in CISA KEV. This is a preemptive defensive posture post: the window to govern AI-to-data pathways is before your analysts discover how convenient they are.
Detection & Response
The detections below target the three observable behaviors: (1) corporate endpoints sending data to hosted Datasette/AI services, (2) arbitrary SQL execution patterns against Datasette's web API, and (3) unauthorized Datasette server processes running in your environment.
Sigma Rules
---
title: Arbitrary SQL Query via Datasette Web Interface
id: 3f8a1c94-7d2e-4b6a-9c31-5e8d2f4a6b70
status: experimental
description: Detects HTTP requests to Datasette instances carrying inline SQL via the sql= query parameter, including patterns consistent with schema enumeration or multi-database access. Tune the uri_path component to your Datasette deployments.
references:
- https://simonwillison.net/2026/Dec/5/datasette-agent/
- https://attack.mitre.org/techniques/T1190/
author: Security Arsenal
date: 2026/12/06
tags:
- attack.initial_access
- attack.t1190
logsource:
category: webserver
product: apache
service: access
detection:
selection_sql_param:
cs-uri-query|contains:
- 'sql='
- '&sql='
selection_keywords:
cs-uri-query|contains:
- 'sqlite_master'
- 'sqlite_schema'
- 'ATTACH+DATABASE'
- 'ATTACH%20DATABASE'
- 'PRAGMA'
- 'UNION+SELECT'
- 'UNION%20SELECT'
condition: selection_sql_param and selection_keywords
falsepositives:
- Legitimate analyst use of authorized internal Datasette instances; restrict by destination host where possible
level: medium
---
title: Datasette Server Process Execution on Endpoint
id: 8c2d5e17-4a93-4f1b-b8d6-2c7e9a3f51d4
status: experimental
description: Detects execution of the Datasette server binary or uvicorn serving Datasette on endpoints, which may indicate an unauthorized or shadow data-publishing deployment.
references:
- https://simonwillison.net/2026/Dec/5/datasette-agent/
- https://attack.mitre.org/techniques/T1059/
author: Security Arsenal
date: 2026/12/06
tags:
- attack.execution
- attack.t1059.006
logsource:
category: process_creation
product: windows
detection:
selection_img:
Image|endswith:
- '\datasette.exe'
selection_cli:
CommandLine|contains:
- 'datasette serve'
- 'datasette '
- '-m datasette'
condition: selection_img or selection_cli
falsepositives:
- Authorized data science or engineering workstations running Datasette locally
level: low
---
title: Exfiltration-Sized Outbound Transfer to Datasette Hosted Service
id: 1b7f3a62-9e05-4c48-a2d9-6f41c8b73e05
status: experimental
description: Detects outbound network connections to hosted Datasette preview/cloud domains from corporate endpoints, a potential indicator of shadow AI database uploads.
references:
- https://simonwillison.net/2026/Dec/5/datasette-agent/
- https://attack.mitre.org/techniques/T1567/
author: Security Arsenal
date: 2026/12/06
tags:
- attack.exfiltration
- attack.t1567.002
logsource:
category: dns
product: windows
detection:
selection:
QueryName|endswith:
- '.datasette.io'
- 'agent.datasette.io'
- '.datasette.cloud'
falsepositives:
- Developers evaluating the tooling with non-sensitive sample data
level: medium
KQL — Microsoft Sentinel / Defender
This query hunts for endpoints resolving or connecting to hosted Datasette services, joined against process context so you can see which tool initiated the connection (browser vs. scripted upload) — a browser session is an analyst exploring; python.exe or curl.exe uploading is a pipeline you need to find.
let DatasetteHosts = dynamic(["agent.datasette.io", "datasette.io", "datasette.cloud", "charts.datasette.io"]);
let DnsHits = DeviceNetworkEvents
| where TimeGenerated > ago(7d)
| where RemoteUrl has_any (DatasetteHosts)
| summarize Connections=count(), FirstSeen=min(TimeGenerated), LastSeen=max(TimeGenerated),
InitiatingProcesses=make_set(InitiatingProcessFileName),
RemoteIPs=make_set(RemoteIP)
by DeviceName, RemoteUrl;
DnsHits
| join kind=leftouter (
DeviceProcessEvents
| where TimeGenerated > ago(7d)
| where ProcessCommandLine has_any ("datasette", "sqlite3", ".db", ".sqlite")
| summarize RelatedCmds=make_set(ProcessCommandLine, 5) by DeviceName
) on DeviceName
| project DeviceName, RemoteUrl, Connections, FirstSeen, LastSeen, InitiatingProcesses, RelatedCmds
| sort by Connections desc;
For environments ingesting web proxy or firewall logs as CommonSecurityLog, this companion query catches inline SQL against any Datasette-style endpoint:
CommonSecurityLog
| where TimeGenerated > ago(24h)
| where RequestURL contains "sql=" or RequestURL contains ".json?"
| where RequestURL has_any ("sqlite_master", "sqlite_schema", "ATTACH", "PRAGMA", "UNION SELECT", "load_extension")
| summarize RequestCount=count(), DistinctSources=dcount(SourceIP) by RequestURL, DestinationHostName, DestinationIP
| sort by RequestCount desc;
Velociraptor VQL
Hunt endpoints for Datasette server processes and recently modified SQLite database files in user-writable locations — the footprint of a shadow data-analysis deployment:
-- Hunt for Datasette processes and recently touched SQLite databases in user profiles
LET procs = SELECT Pid, Name, CommandLine, Exe, Username, CreateTime
FROM pslist()
WHERE CommandLine =~ 'datasette|uvicorn'
OR Exe =~ 'datasette'
LET dbs = SELECT FullPath, Size, Mtime, Btime
FROM glob(globs='C:/Users/*/**/*.db',
accessor='ntfs')
WHERE Mtime > now() - 86400 * 7
OR Btime > now() - 86400 * 7
SELECT * FROM procs
UNION ALL
SELECT NULL AS Pid, 'SQLiteFile' AS Name, FullPath AS CommandLine,
format(format='%d bytes', args=Size) AS Exe, '' AS Username,
Mtime AS CreateTime FROM dbs
On Linux fleets, adapt the glob to /home/*/**/*.db and /home/*/**/*.sqlite* and add **/site-packages/datasette/** to catch installed packages.
Audit and Hardening Script
Run this on Linux/macOS hosts where Datasette may be deployed, to enumerate listening Datasette processes, check whether they bind to all interfaces, and inventory SQLite files with weak permissions:
#!/usr/bin/env bash
# datasette_audit.sh — Audit for unauthorized Datasette deployments and exposed SQLite data
set -euo pipefail
echo "=== [1] Listening Datasette / uvicorn processes ==="
ss -tlnp 2>/dev/null | grep -Ei 'datasette|uvicorn|:8001' || echo "None found."
echo ""
echo "=== [2] Processes with 'datasette' in command line ==="
ps -eo pid,user,cmd | grep -i datasette | grep -v grep || echo "None found."
echo ""
echo "=== [3] Datasette installs in Python environments ==="
find /home /opt /srv -maxdepth 6 -type d -name "datasette" -path "*site-packages*" 2>/dev/null | head -20 || true
echo ""
echo "=== [4] World-readable SQLite databases ==="
find /home /srv /var/www /opt -type f \( -name "*.db" -o -name "*.sqlite" -o -name "*.sqlite3" \) -perm -o=r 2>/dev/null | head -50 || echo "None found."
echo ""
echo "=== [5] Check for dangerously permissive Datasette flags ==="
ps -eo cmd | grep -i datasette | grep -E -- '--cors|--root|0.0.0.0' | grep -v grep && \
echo "WARNING: Datasette found with --cors, --root, or bound to 0.0.0.0 — review immediately." || \
echo "No permissive flags detected."
echo ""
echo "Audit complete. Remediate: bind Datasette to 127.0.0.1 behind an authenticated reverse proxy,"
echo "run with --readonly, remove --root, and never expose the /sql arbitrary-query endpoint to untrusted networks."
Remediation and Governance Recommendations
- Publish an AI-to-data policy now, not after the first incident. Explicitly enumerate which hosted AI analysis tools are approved for which data classifications. "SQLite export of production" belongs in the never-upload category until a sanctioned internal instance exists.
- If you deploy Datasette internally, harden it. Bind to localhost behind an authenticated reverse proxy (SSO via your IdP), run with
--readonly, drop--root, disable the arbitrary?sql=endpoint for unprivileged users via Datasette's permission system (permissions-sql/ allow blocks indatasette.yml), and never load SQLite extensions that grant network or filesystem reach. - Treat the LLM as an untrusted principal. Any agent that executes generated SQL should operate against a dedicated read replica or snapshot with row-level sensitive data masked. Assume prompt injection via data content will eventually succeed and design the blast radius accordingly.
- Block or monitor egress to hosted AI data tools. Add agent.datasette.io and analogous hosted analysis services to your proxy category review. Redirect users to a sanctioned internal alternative — convenience is the driver, so the internal path must be equally easy.
- Log and alert on Datasette's query log. Datasette can log executed queries. Ship these to your SIEM and alert on
sqlite_masterenumeration,ATTACH DATABASE,PRAGMA, and queries against tables outside the user's stated scope. - Update your DLP and insider-risk rules. SQLite database files (
.db,.sqlite,.sqlite3) in browser upload events are a high-fidelity DLP signal — most business workflows have no legitimate reason to upload database files to external web apps. - Include AI agent tooling in tabletop exercises. Your IR playbooks should answer: "An analyst uploaded a customer database to a hosted AI tool — what is our evidence, notification, and containment path?" This is a 2026 breach scenario, not a hypothetical.
The Datasette project is excellent engineering, and none of this is a criticism of the tool. The risk lives in the gap between how easy these tools make data analysis and how slowly enterprise governance adapts. Close that gap before your data does it for you.
Related Resources
Security Arsenal Penetration Testing Services AlertMonitor Platform Book a SOC Assessment vulnerability-management Intel Hub
Is your security operations ready?
Get a free SOC assessment or see how AlertMonitor cuts through alert noise with automated triage.