Vulnerabilities in pkg:pypi/datasette
PACKAGECVE-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.
pkg:pypi/datasette
Vulnerability advisories affecting package pkg:pypi/datasette. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-7ch3-7pp7-7cpq | CVE-2023-40570 | MODERATE | Datasette 1.0 alpha series leaks names of databases and tables to unauthenticated users |
| GHSA-w832-gg5g-x44m | CVE-2025-64481 | LOW | Open redirect endpoint in Datasette |
| GHSA-xw7c-jx9m-xh5g | CVE-2021-32670 | MODERATE | Reflected cross-site scripting issue in Datasette |
| GHSA-gff3-739c-gxfq | - | HIGH | Duplicate Advisory: Reflected cross-site scripting issue in Datasette |
| GHSA-q6j3-c4wc-63vw | - | MODERATE | CSRF tokens leaked in URL by canned query form |
CVE-2023-40570 at a Glance
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).
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.
pip install datasette>=1.0a4
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
CVE-2023-40570 Affected Datasette Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
datasette
|
PyPI |
≥ 1.0a0
< 1.0a4
|
1.0a4
|
References
Frequently Asked Questions
What is CVE-2023-40570?
Which Datasette versions are affected?
What version fixes CVE-2023-40570?
Is datasette affected?
What is the CVSS score of CVE-2023-40570?
What CWE is associated with CVE-2023-40570?
How can I check PyPI dependencies for CVE-2023-40570?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"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"
}
}