7.2high
Reflected cross-site scripting issue in Datasette
- Severity
- 7.2high CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.96% (higher than 62% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-gff3-739c-gxfqGHSA-xw7c-jx9m-xh5gPYSEC-2021-89
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
| Product or package | Versions | Reported by |
|---|---|---|
| simonw datasette | < 0.56.1 | CVE List |
| datasette (PyPI) | before 0.56.1 | GitHub Advisory Database, PyPA Advisory Database |
| datasette datasette | before 0.56.1 | NVD |
All scores
| GitHub_M | 7.2high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:N |
| GitHub | 7.2high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:N |
| GitHub | medium CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N |
| NVD | 6.1medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
| NVD | 4.3medium CVSS:2.0 | AV:N/AC:M/Au:N/C:N/I:P/A:N |
Classification
What each source says
CVE List
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.
GitHub Advisory Database
Duplicate Advisory
This advisory has been withdrawn because it is a duplicate of GHSA-xw7c-jx9m-xh5g. This link is maintained to preserve external references.
Original 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 vulnerability. This vulnerability is particularly relevant if your Datasette installation includes authenticated features using plugins such as 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.
GitHub Advisory Database
Impact
The ?_trace=1 debugging feature in Datasette does not correctly escape generated HTML, resulting in a reflected cross-site scripting vulnerability.
This vulnerability is particularly relevant if your Datasette installation includes authenticated features using plugins such as datasette-auth-passwords as an attacker could use the vulnerability to access protected data.
Patches
Datasette 0.57 and 0.56.1 both include patches for this issue.
Workarounds
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.
References
For more information
If you have any questions or comments about this advisory:
- Open a discussion in simonw/datasette
- Email us at
swillison+datasette @ gmail.com
NVD (es)
Datasette es una multiherramienta de código abierto para explorar y publicar datos. La funcionalidad debugging "?_trace=1" de Datasette no escapa correctamente del HTML generado, resultando en una vulnerabilidad de tipo [reflected cross-site scripting](https://owasp.org/www-community/attacks/xss/#reflected-xss-attacks). Esta vulnerabilidad es particularmente relevante si su instalación de Datasette incluye funcionalidades autenticadas usando plugins como [datasette-auth-passwords](https://datasette.io/plugins/datasette-auth-passwords) ya que un atacante podría usar la vulnerabilidad para acceder a datos protegidos. Datasette versiones 0.57 y 0.56.1 incluyen parches para este problema. Si ejecutas Datasette detrás de un proxy, puede solucionar este problema rechazando cualquier petición entrante con los parámetros "?_trace=" o "&_trace=" en sus parámetros query string
References
| https://github.com/simonw/datasette/security/advisories/GHSA-xw7c-jx9m-xh5g | advisory, third-party-advisory, web | |
| https://github.com/simonw/datasette/issues/1360 | issue-tracking, patch, report, third-party-advisory, web | |
| https://datasette.io/plugins/datasette-auth-passwords | vendor-advisory, web | |
| https://owasp.org/www-community/attacks/xss/#reflected-xss-attacks | third-party-advisory, web | |
| https://pypi.org/project/datasette/ | package, release-notes, third-party-advisory | |
| https://nvd.nist.gov/vuln/detail/CVE-2021-32670 | advisory | |
| https://pypi.org/project/datasette | web | |
| https://github.com/advisories/GHSA-gff3-739c-gxfq | advisory | |
| https://github.com/pypa/advisory-database/tree/main/vulns/datasette/PYSEC-2021-89.yaml | web | |
| https://github.com/simonw/datasette | package | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2021-32670 changed 2024-08-03 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-gff3-739c-gxfq changed 2024-12-06 | CC-BY-4.0 |
| GitHub Advisory Database | GHSA-xw7c-jx9m-xh5g changed 2026-07-08 | CC-BY-4.0 |
| NVD | CVE-2021-32670 changed 2026-06-17 | Public domain |
| PyPA Advisory Database | PYSEC-2021-89 changed 2023-11-08 | CC-BY-4.0 |