CVE-2023-40570: Datasette Datasette 1.0 Alpha Series Leaks Vulnerability

MODERATE
Advisory Identifier: GHSA-7ch3-7pp7-7cpq
CVSS 5.3
CWE-213 CWE-200
Published
Advisory Summary

CVE-2023-40570 is a MODERATE (CVSS 5.3) datasette 1.0 alpha series leaks vulnerability (CWE-213: Exposure of Sensitive Information Due to Incompatible Policies) affecting Datasette libraries in the PyPI ecosystem. The issue involves datasette 1.0 alpha series leaks names of databases and tables to unauthenticated users. Remediation is available by upgrading affected packages to version 1.0a4.

CVE-2023-40570 at a Glance

CVE Identifier CVE-2023-40570
GHSA Identifier GHSA-7ch3-7pp7-7cpq
Severity MODERATE
CVSS v3.1 Base Score 5.3
CWE Classification CWE-213: Exposure of Sensitive Information Due to Incompatible Policies
Affected Product Datasette
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 5.3

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality Low (C:L)
Integrity None (I:N)
Availability None (A:N)

How to Fix CVE-2023-40570

To remediate this vulnerability, upgrade all affected Datasette dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

datasette fixed: 1.0a4
pip install datasette>=1.0a4
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show datasette

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2023-40570, inspect your installed packages using pip:

pip show datasette

Analyze the terminal output to locate any version of Datasette in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.0a4), your application is affected.

Note: The pip show datasette command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-213: Exposure of Sensitive Information Due to Incompatible Policies, where the product's intended functionality exposes information to certain actors in accordance with the developer's security policy, but this information is regarded as sensitive according to the intended security policies of other stakeholders such as the product's administrator, users, or others whose information is being processed. In Datasette, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Impact This bug affects Datasette instances running a Datasette 1.0 alpha - 1.0a0, 1.0a1, 1.0a2 or 1.0a3 - in an online accessible location but with authentication enabled using a plugin such as [datasette-auth-passwords](https://datasette.io/plugins/datasette-auth-passwords). The `/-/api` API explorer endpoint could reveal the names of both databases and tables - but not their contents - to an unauthenticated user. ### Patches Datasette 1.0a4 has a fix for this issue. ### Workarounds To work around this issue, block all traffic to the `/-/api` endpoint. This can be done with a proxy such as Apache or NGINX, or by installing the [datasette-block](https://datasette.io/plugins/datasette-block) plugin and adding the following configuration to your `metadata.json` or `metadata.yml` file: ```json { "plugins": { "datasette-block": { "prefixes": ["/-/api"] } } } ``` This will block access to the API explorer but will still allow access to the Datasette read or write JSON APIs, as those use different URL patterns within the Datasette `/database` hierarchy.

CVE-2023-40570 Affected Datasette Versions

1 component(s)
Fixed Versions:
1.0a4
Product / Package Ecosystem Affected Versions Fixed Version
datasette
PyPI
≥ 1.0a0
< 1.0a4
1.0a4

References

Frequently Asked Questions

What is CVE-2023-40570?
CVE-2023-40570 is a security vulnerability in Datasette involving Datasette 1.0 alpha series leaks names of databases and tables to unauthenticated users under CWE-213: Exposure of Sensitive Information Due to Incompatible Policies.
Which Datasette versions are affected?
Affected versions include releases prior to 1.0a4 across affected packages: datasette.
What version fixes CVE-2023-40570?
Upgrading to 1.0a4 (or the latest patched release for your respective branch) resolves the vulnerability.
Is datasette affected?
Yes, datasette is affected in releases prior to 1.0a4. Upgrade your dependency to 1.0a4 or later.
What is the CVSS score of CVE-2023-40570?
CVE-2023-40570 has a CVSS v3.1 base score of 5.3 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N.
What CWE is associated with CVE-2023-40570?
CVE-2023-40570 is classified under CWE-213: Exposure of Sensitive Information Due to Incompatible Policies (The product's intended functionality exposes information to certain actors in accordance with the developer's security policy, but this information is regarded as sensitive according to the intended security policies of other stakeholders such as the product's administrator, users, or others whose information is being processed.).
How can I check PyPI dependencies for CVE-2023-40570?
Run the dependency tree command: 'pip show datasette'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-7ch3-7pp7-7cpq",
  "modified" : "2026-06-09T13:12:50Z",
  "published" : "2023-08-22T18:06:46Z",
  "aliases" : [ "CVE-2023-40570" ],
  "summary" : "Datasette 1.0 alpha series leaks names of databases and tables to unauthenticated users",
  "details" : "### Impact\n\nThis bug affects Datasette instances running a Datasette 1.0 alpha - 1.0a0, 1.0a1, 1.0a2 or 1.0a3 - in an online accessible location but with authentication enabled using a plugin such as [datasette-auth-passwords](https://datasette.io/plugins/datasette-auth-passwords).\n\nThe `/-/api` API explorer endpoint could reveal the names of both databases and tables - but not their contents - to an unauthenticated user.\n\n### Patches\n\nDatasette 1.0a4 has a fix for this issue.\n\n### Workarounds\n\nTo work around this issue, block all traffic to the `/-/api` endpoint. This can be done with a proxy such as Apache or NGINX, or by installing the [datasette-block](https://datasette.io/plugins/datasette-block) plugin and adding the following configuration to your `metadata.json` or `metadata.yml` file:\n\n```json\n{\n    \"plugins\": {\n        \"datasette-block\": {\n            \"prefixes\": [\"/-/api\"]\n        }\n    }\n}\n```\nThis will block access to the API explorer but will still allow access to the Datasette read or write JSON APIs, as those use different URL patterns within the Datasette `/database` hierarchy.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "datasette"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.0a0"
      }, {
        "fixed" : "1.0a4"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/simonw/datasette/security/advisories/GHSA-7ch3-7pp7-7cpq"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-40570"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/simonw/datasette/commit/01e0558825b8f7ec17d3b691aa072daf122fcc74"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pypa/advisory-database/tree/main/vulns/datasette/PYSEC-2023-154.yaml"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/simonw/datasette"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-200", "CWE-213" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-08-22T18:06:46Z",
    "nvd_published_at" : "2023-08-25T01:15:09Z"
  }
}