Vulnerability · Published Jun 7, 2021 · Assigned by GitHub_M
CVE-2021-32670Reflected cross-site scripting issue in Datasette
High 7.2
In plain English
A high-severity cross-site scripting in datasette from simonw. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 1.0% (higher than 62% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
Datasette is an open source multi-tool for exploring and publishing data. The `?_trace=1` debugging feature in Datasette does not correctly escape generated HTML, resulting in a [reflected cross-site scripting](https://owasp.org/www-community/attacks/xss/#reflected-xss-attacks) vulnerability. This vulnerability is particularly relevant if your Datasette installation includes authenticated features using plugins such as [datasette-auth-passwords](https://datasette.io/plugins/datasette-auth-passwords) as an attacker could use the vulnerability to access protected data. Datasette 0.57 and 0.56.1 both include patches for this issue. If you run Datasette behind a proxy you can workaround this issue by rejecting any incoming requests with `?_trace=` or `&_trace=` in their query string parameters.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| PyPI | datasette | 0.56.1 | GHSA-gff3-739c-gxfq |
| PyPI | datasette | 0.56.1 | GHSA-xw7c-jx9m-xh5g |
| PyPI | datasette | 0.56.1 | PYSEC-2021-89 |
Affected products (as reported)
Weakness: CWE-79 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:N
References
- https://github.com/simonw/datasette/security/advisories/GHSA-xw7c-jx9m-xh5g x_refsource_CONFIRM
- https://github.com/simonw/datasette/issues/1360 x_refsource_MISC
- https://datasette.io/plugins/datasette-auth-passwords x_refsource_MISC
- https://owasp.org/www-community/attacks/xss/#reflected-xss-attacks x_refsource_MISC
- https://pypi.org/project/datasette/ x_refsource_MISC