GHSA-7ch3-7pp7-7cpq

Suggest an improvement
Source
https://github.com/advisories/GHSA-7ch3-7pp7-7cpq
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2023/08/GHSA-7ch3-7pp7-7cpq/GHSA-7ch3-7pp7-7cpq.json
JSON Data
https://api.test.osv.dev/v1/vulns/GHSA-7ch3-7pp7-7cpq
Aliases
Related
Published
2023-08-22T18:06:46Z
Modified
2023-11-08T05:21:54.780319Z
Severity
  • 5.3 (Medium) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N CVSS Calculator
Summary
Datasette 1.0 alpha series leaks names of databases and tables to unauthenticated users
Details

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.

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 plugin and adding the following configuration to your metadata.json or metadata.yml file:

{
    "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.

Database specific
{
    "nvd_published_at": "2023-08-25T01:15:09Z",
    "cwe_ids": [
        "CWE-200",
        "CWE-213"
    ],
    "severity": "MODERATE",
    "github_reviewed": true,
    "github_reviewed_at": "2023-08-22T18:06:46Z"
}
References

Affected packages

PyPI / datasette

Package

Affected ranges

Type
ECOSYSTEM
Events
Introduced
1.0a0
Fixed
1.0a4

Affected versions

1.*

1.0a0
1.0a1
1.0a2
1.0a3