{"id":"CVE-2021-32670","aliases":["CVE-2021-32670","GHSA-gff3-739c-gxfq","GHSA-xw7c-jx9m-xh5g","PYSEC-2021-89"],"related":[],"kind":"vulnerability","state":"published","title":"Reflected cross-site scripting issue in Datasette","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"## Duplicate Advisory\nThis advisory has been withdrawn because it is a duplicate of GHSA-xw7c-jx9m-xh5g. This link is maintained to preserve external references.\n\n## Original Description\nDatasette 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.","format":"markdown","source":"ghsa"},{"lang":"en","text":"### Impact\n\nThe `?_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.\n\nThis 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.\n\n### Patches\n\nDatasette 0.57 and 0.56.1 both include patches for this issue.\n\n### Workarounds\n\nIf 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.\n\n### References\n\n- [OWASP guide to reflected cross-site scripting](https://owasp.org/www-community/attacks/xss/#reflected-xss-attacks)\n- [Datasette issue #1360](https://github.com/simonw/datasette/issues/1360)\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Open a discussion in [simonw/datasette](https://github.com/simonw/datasette/discussions)\n* Email us at `swillison+datasette @ gmail.com`","format":"markdown","source":"ghsa"},{"lang":"es","text":"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 \"&amp;_trace=\" en sus parámetros query string","source":"nvd"}],"published":"2021-06-07T21:20:13.000Z","modified":"2026-07-08T06:28:56.693Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:N","score":7.2,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:N","score":7.2,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:N","score":7.2,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"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","rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","score":6.1,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:N/AC:M/Au:N/C:N/I:P/A:N","score":4.3,"rating":"MEDIUM"}],"cwes":["CWE-79"],"affected":[{"ranges":[{"version":"< 0.56.1","status":"affected"}],"vendor":"simonw","product":"datasette","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"0.56.1"}],"ecosystem":"PyPI","package":"datasette","purl":"pkg:pypi/datasette","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"0.56.1"}],"ecosystem":"PyPI","package":"datasette","purl":"pkg:pypi/datasette","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"0.56.1"}],"vendor":"datasette","product":"datasette","cpe":"cpe:2.3:a:datasette:datasette:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"0.56.1"}],"ecosystem":"PyPI","package":"datasette","purl":"pkg:pypi/datasette","source":"pysec"}],"references":[{"url":"https://github.com/simonw/datasette/security/advisories/GHSA-xw7c-jx9m-xh5g","tags":["advisory","third-party-advisory","web","x-refsource-confirm","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/simonw/datasette/issues/1360","tags":["issue-tracking","patch","report","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://datasette.io/plugins/datasette-auth-passwords","tags":["vendor-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://owasp.org/www-community/attacks/xss/#reflected-xss-attacks","tags":["third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://pypi.org/project/datasette/","tags":["package","release-notes","third-party-advisory","x-refsource-misc","x-transferred"],"sources":["cvelist","nvd","pysec"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-32670","tags":["advisory"],"sources":["ghsa"]},{"url":"https://pypi.org/project/datasette","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/advisories/GHSA-gff3-739c-gxfq","tags":["advisory"],"sources":["ghsa","pysec"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/datasette/PYSEC-2021-89.yaml","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/simonw/datasette","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2021-32670","url":"https://www.cve.org/CVERecord?id=CVE-2021-32670","licence":"CVE Terms of Use","modified":"2024-08-03T23:25:31.015Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-gff3-739c-gxfq","url":"https://github.com/advisories/GHSA-gff3-739c-gxfq","licence":"CC-BY-4.0","modified":"2024-12-06T05:29:04.349Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-xw7c-jx9m-xh5g","url":"https://github.com/advisories/GHSA-xw7c-jx9m-xh5g","licence":"CC-BY-4.0","modified":"2026-07-08T06:28:56.693Z"},{"source":"nvd","name":"NVD","id":"CVE-2021-32670","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-32670","licence":"Public domain","modified":"2026-06-17T03:53:23.290Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2021-89","url":"https://osv.dev/vulnerability/PYSEC-2021-89","licence":"CC-BY-4.0","modified":"2023-11-08T04:05:56.311Z"}],"updatedAt":"2026-11-25T22:58:01.678Z","epss":{"score":0.0096,"percentile":0.62535,"date":"2026-12-01T12:00:22.000Z"}}