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

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 7.2
- **CVSS:** 7.2 (v3.1, CNA) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:N`
- **CVSS metrics:** Attack vector: Network; Attack complexity: Low; Privileges required: None; User interaction: None; Scope: Changed (impact reaches other components); Confidentiality impact: Low; Integrity impact: Low; Availability impact: None
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, no login needed
- **EPSS:** 0.96% (percentile 60, 2026-11-26)
- **CWE:** CWE-79
- **Aliases:** GHSA-gff3-739c-gxfq, GHSA-xw7c-jx9m-xh5g, PYSEC-2021-89
- **Published:** 2021-06-07T21:20:13.000Z
- **Modified:** 2026-07-08T06:28:56.693Z

## Who should check

- Projects that depend on PyPI package datasette (\< 0.56.1)
- Anyone running simonw datasette \< 0.56.1

## 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 and fixed versions

- PyPI `datasette`: affected \< 0.56.1; fixed 0.56.1 (osv)
- simonw datasette: \< 0.56.1 (cvelist)

## Mitigation

- Upgrade datasette to 0.56.1 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2021-32670. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2021-32670.md
Affected: datasette < 0.56.1
Fixed in: 0.56.1

Steps:
1. Search this machine and project for datasette (PyPI), simonw datasette: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2021-32670 being exploited?

There is no confirmed exploitation: CVE-2021-32670 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.96% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2021-32670?

High: CVSS 7.2 (v3.1, scored by CNA). Remote, no login needed.

### Which versions are affected by CVE-2021-32670?

datasette \< 0.56.1.

### Is there a fix for CVE-2021-32670?

Yes. Fixed in 0.56.1. Upgrade datasette to 0.56.1 or later.

### How do I check if I'm affected by CVE-2021-32670?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- vendor: <https://github.com/simonw/datasette/security/advisories/GHSA-xw7c-jx9m-xh5g>
- vendor: <https://datasette.io/plugins/datasette-auth-passwords>
- vendor: <https://nvd.nist.gov/vuln/detail/CVE-2021-32670>
- vendor: <https://github.com/advisories/GHSA-gff3-739c-gxfq>
- patch: <https://github.com/simonw/datasette/issues/1360>
- other: <https://owasp.org/www-community/attacks/xss/#reflected-xss-attacks>
- other: <https://pypi.org/project/datasette/>
- other: <https://pypi.org/project/datasette>
- other: <https://github.com/pypa/advisory-database/tree/main/vulns/datasette/PYSEC-2021-89.yaml>
- other: <https://github.com/simonw/datasette>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2021-32670>
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/GHSA-gff3-739c-gxfq> (license: <https://creativecommons.org/licenses/by/4.0/>)
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/GHSA-xw7c-jx9m-xh5g> (license: <https://creativecommons.org/licenses/by/4.0/>)
- OSV: CC-BY 4.0 <https://osv.dev/vulnerability/PYSEC-2021-89> (license: <https://creativecommons.org/licenses/by/4.0/>)

HTML: <https://flawdb.com/CVE-2021-32670> · JSON: <https://flawdb.com/api/v1/entries/CVE-2021-32670>
