# CVE-2021-32670: Reflected cross-site scripting issue in Datasette

- Severity: High 7.2 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.96%, higher than 62% of CVEs (2026-12-01)
- Published: 2021-06-07T21:20:13.000Z
- Modified: 2026-07-08T06:28:56.693Z
- Also known as: GHSA-gff3-739c-gxfq, GHSA-xw7c-jx9m-xh5g, PYSEC-2021-89
- Weaknesses: CWE-79
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- simonw datasette: < 0.56.1
- datasette (PyPI): before 0.56.1
- datasette datasette: before 0.56.1

## Every score

- GitHub_M: CVSS:3.1 7.2 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:N`
- GitHub: CVSS:3.1 7.2 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:N`
- GitHub: CVSS:4.0 Medium `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: CVSS:3.1 6.1 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N`
- NVD: CVSS:2.0 4.3 Medium `AV:N/AC:M/Au:N/C:N/I:P/A:N`

## 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

- CVE List: [CVE-2021-32670](https://www.cve.org/CVERecord?id=CVE-2021-32670), CVE Terms of Use, modified 2024-08-03
- GitHub Advisory Database: [GHSA-gff3-739c-gxfq](https://github.com/advisories/GHSA-gff3-739c-gxfq), CC-BY-4.0, modified 2024-12-06
- GitHub Advisory Database: [GHSA-xw7c-jx9m-xh5g](https://github.com/advisories/GHSA-xw7c-jx9m-xh5g), CC-BY-4.0, modified 2026-07-08
- NVD: [CVE-2021-32670](https://nvd.nist.gov/vuln/detail/CVE-2021-32670), Public domain, modified 2026-06-17
- PyPA Advisory Database: [PYSEC-2021-89](https://osv.dev/vulnerability/PYSEC-2021-89), CC-BY-4.0, modified 2023-11-08

---

Page: https://cve.day/CVE-2021-32670 · Whole record: https://cve.day/CVE-2021-32670.json · Rebuilt by cve.day 2026-11-25T22:58:01.678Z
