{"answers":{"affected":"5 open source packages ship an affected version, including datasette. It affects 1 product.","exploited":"There is no known exploitation of CVE-2021-32670 in the wild and no public exploit code.","fix":"Upgrade datasette to 0.56.1 or later.","what":"CVE-2021-32670 is a high-severity cross-site scripting vulnerability in simonw datasette, published on 7 Jun 2021. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2021-32670 and fix it if it is affected.\n\nWhat it is: CVE-2021-32670 is a high-severity cross-site scripting vulnerability in simonw datasette, published on 7 Jun 2021. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2021-32670 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- datasette (PyPI): affected all versions; fixed in 0.56.1\n- datasette (PyPI): affected all versions; fixed in 0.56.1\n- datasette (PyPI): affected all versions; fixed in 0.56.1\n- datasette (PyPI): affected all versions; fixed in 0.56.1\n- datasette (PyPI): affected all versions; fixed in 0.56.1\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2021-32670/ (Markdown: https://insights.sbomify.com/CVE-2021-32670/index.md)","id":"CVE-2021-32670","markdown":"https://insights.sbomify.com/CVE-2021-32670/index.md","name":"CVE-2021-32670","record":{"aliases":["GHSA-gff3-739c-gxfq","GHSA-xw7c-jx9m-xh5g","PYSEC-2021-89"],"analysis":{"component_type":"web_application","fix_type":"upgrade","impacts":["data_read","account_takeover"],"network_reachable":"yes","non_default_config":true,"product_category":"Datasette data tool","requires_auth":"none","summary":"Attackers can execute arbitrary scripts via the debug trace feature, potentially accessing protected data in authenticated Datasette installations.","user_interaction":"not_required","vuln_class":"xss"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"datasette","vendor":"datasette"}],"cvss":{"score":7.2,"severity":"high","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:N","version":"3.1"},"cwes":[{"id":"CWE-79","name":"Improper Neutralization of Input During Web Page Generation"}],"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 `\u0026_trace=` in their query string parameters.","ecosystems":["PyPI"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"Reflected cross-site scripting issue in Datasette","id":"CVE-2021-32670","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"PyPI","product":null,"products":[],"type":"xss","year":"2021"},"n_packages":5,"n_references":5,"next":{"headline":"XSS vulnerability with translator","id":"CVE-2021-32671"},"packages":[{"ecosystem":"PyPI","fixed":["0.56.1"],"introduced":["0"],"last_affected":[],"package":"datasette","purl":null,"source":"GHSA-gff3-739c-gxfq"},{"ecosystem":"PyPI","fixed":["0.56.1"],"introduced":["0"],"last_affected":[],"package":"datasette","purl":"pkg:pypi/datasette","source":"GHSA-gff3-739c-gxfq"},{"ecosystem":"PyPI","fixed":["0.56.1"],"introduced":["0"],"last_affected":[],"package":"datasette","purl":null,"source":"GHSA-xw7c-jx9m-xh5g"},{"ecosystem":"PyPI","fixed":["0.56.1"],"introduced":["0"],"last_affected":[],"package":"datasette","purl":"pkg:pypi/datasette","source":"GHSA-xw7c-jx9m-xh5g"},{"ecosystem":"PyPI","fixed":["0.56.1"],"introduced":["0"],"last_affected":[],"package":"datasette","purl":"pkg:pypi/datasette","source":"PYSEC-2021-89"}],"prev":{"headline":"Cross-Site Scripting in Backend Grid View","id":"CVE-2021-32669"},"products":["datasette"],"published":"2021-06-07","related":[{"cvss_score":5.3,"headline":"Datasette 1.0 alpha series leaks names of databases and tables to unauthenticated users","id":"CVE-2023-40570","kev_date_added":null,"published":"2023-08-25"}],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"PyPA Advisory Database","prefix":"PYSEC"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":"PUBLISHED","updated":"2024-08-03","vendors":["simonw"]},"summary":"Attackers can execute arbitrary scripts via the debug trace feature, potentially accessing protected data in authenticated Datasette installations.","url":"https://insights.sbomify.com/CVE-2021-32670/"}