agenticoutputs
Open Source

Datasette SQL Injection Flaw: Patch Now If You Mix Public and Private Tables

mrmolsen · August 7, 2026 ·4 min read
Datasette SQL Injection Flaw: Patch Now If You Mix Public and Private Tables

Decades after the “Little Bobby Tables” comic strip became a developer meme, SQL injection is still shipping to prod. This week, a critical patch for the open-source tool Datasette serves as a stark reminder that even well-maintained projects can be vulnerable, especially in configurations that seem benign. If your Datasette instance serves both public and private tables from the same database file, your private data is exposed.

The vulnerability allows an attacker to bypass Datasette’s permissions system and read data from tables they should not have access to. This effectively nullifies access controls for any private data within that mixed-permission database.

The At-Risk Configuration

This isn’t a theoretical flaw. The risk is specific and immediate for a common setup. You are vulnerable if your Datasette instance serves a single database file containing a mix of public tables and tables restricted by Datasette’s permission rules.

The core issue is the co-location of data with different access levels within one database. An instance serving multiple databases, where one is entirely public and another is entirely private, is not affected by this specific vector. The flaw targets the logic that separates access within a single database.

Two patched versions are available and should be installed immediately:

  • Stable: 0.65.3
  • Alpha: 1.0a38

No CVE ID has been assigned yet. That does not reduce the urgency. This is a critical security fix.

SQL Injection Is Not a Solved Problem

This bug class continues to produce high-severity compromises in real-world software. In July 2026, Huntress reported attackers exploiting a SQL injection in an application to gain database access. From there, they compiled and executed a post-exploitation toolkit called “khunt” directly inside the Oracle database, eventually escalating to SYSTEM-level access on the underlying Windows server.

Similarly, a recent cPanel patch addressed CVE-2026-58048, a critical flaw allowing an authenticated customer to execute SQL commands as the database root user. This kind of vulnerability can lead to a full server compromise. The Datasette patch prevents a similar class of data exfiltration. It demands action now, not during your next scheduled maintenance window.

How to Check Your Instance

To determine if your instance is vulnerable, inspect your metadata.json or datasette.yaml configuration file. Look for a single database entry that contains table-level allow or deny rules.

If you find a configuration where one database file has rules exposing some tables publicly while restricting others, your instance is vulnerable. The presence of both public and restricted tables in the same database is the trigger.

Upgrade or Mitigate Immediately

The only real fix is to upgrade. The Datasette project has shipped patches for both the stable and alpha release channels.

To upgrade to the latest stable version, run this command:

pip install -U datasette

If you are running on the alpha track for Datasette 1.0, use this command to get the patched pre-release version:

pip install -U --pre datasette

These commands will install 0.65.3 and 1.0a38 respectively, or newer versions if they are available.

Temporary Stop-Gaps

If you absolutely cannot upgrade today, you have two options for temporary mitigation. These reduce exposure but do not fix the underlying flaw.

  1. Separate your databases. Move your public and private tables into completely separate database files. Serve them as distinct databases in Datasette. The vulnerability is scoped to mixed permissions within a single file, so separating the data neutralizes this attack vector.
  2. Restrict network access. Use a firewall or cloud security group to lock down access to the Datasette instance, allowing connections only from trusted IP addresses.

These are not substitutes for patching. They are emergency measures. The official release announcement, available on simonwillison.net, contains the authoritative details. Get the patch, check your configs, and don’t let mixed-permission models become your blind spot.

Share Post on X LinkedIn