{"answers":{"affected":"2 open source packages ship an affected version, including datasette.","exploited":"There is no known exploitation of GHSA-q6j3-c4wc-63vw in the wild and no public exploit code.","fix":"Upgrade datasette to 0.46 or later.","what":"GHSA-q6j3-c4wc-63vw is a vulnerability in datasette, published on 11 Aug 2020. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for GHSA-q6j3-c4wc-63vw and fix it if it is affected.\n\nWhat it is: GHSA-q6j3-c4wc-63vw is a vulnerability in datasette, published on 11 Aug 2020. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.\nExploitation: There is no known exploitation of GHSA-q6j3-c4wc-63vw in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- datasette (PyPI): affected all versions; fixed in 0.46\n- datasette (PyPI): affected all versions; fixed in 0.46\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/GHSA-q6j3-c4wc-63vw/ (Markdown: https://insights.sbomify.com/GHSA-q6j3-c4wc-63vw/index.md)","id":"GHSA-q6j3-c4wc-63vw","markdown":"https://insights.sbomify.com/GHSA-q6j3-c4wc-63vw/index.md","name":"GHSA-q6j3-c4wc-63vw","record":{"aliases":[],"analysis":{"component_type":"web_application","fix_type":"upgrade","impacts":["data_read","security_bypass"],"network_reachable":"yes","non_default_config":false,"product_category":"Datasette web application","requires_auth":"none","summary":"Read-only form submissions leak CSRF tokens in URLs, potentially exposing them to attackers via referrer headers.","user_interaction":"required","vuln_class":"information_disclosure"},"analysis_generated_by":"qwen3.8-flash-next","assigner":null,"cpe":[],"cvss":{"score":null,"severity":null,"source":null,"vector":null,"version":null},"cwes":[],"description":"### Impact\n\nThe HTML form for a read-only canned query includes the hidden CSRF token field added in #798 for writable canned queries (#698).\n\nThis means that submitting those read-only forms exposes the CSRF token in the URL - for example on https://latest.datasette.io/fixtures/neighborhood_search submitting the form took me to:\n\nhttps://latest.datasette.io/fixtures/neighborhood_search?text=down\u0026csrftoken=CSRFTOKEN-HERE\n\nThis token could potentially leak to an attacker if the resulting page has a link to an external site on it and the user clicks the link, since the token would be exposed in the referral logs.\n\n### Patches\n\nA fix for this issue has been released in Datasette 0.46.\n\n### Workarounds\n\nYou can fix this issue in a Datasette instance without upgrading by copying the [0.46 query.html template](https://raw.githubusercontent.com/simonw/datasette/0.46/datasette/templates/query.html) into a custom `templates/` directory and running Datasette with the `--template-dir=templates/` option.\n\n### References\n\nIssue 918 discusses this in details: https://github.com/simonw/datasette/issues/918\n\n### For more information\n\nContact swillison at gmail with any questions.","ecosystems":["PyPI"],"exploits":{"exploitdb":null,"first_seen":null,"github_poc":null,"max_poc_stars":null,"metasploit":null,"nuclei":null,"refs":[],"tier":null},"has_fix":true,"headline":"CSRF tokens leaked in URL by canned query form","id":"GHSA-q6j3-c4wc-63vw","indexable":true,"kev":null,"kind":"advisory","links":{"ecosystem":"PyPI","product":null,"products":[],"type":"information_disclosure","year":"2020"},"n_packages":2,"n_references":null,"packages":[{"ecosystem":"PyPI","fixed":["0.46"],"introduced":["0"],"last_affected":[],"package":"datasette","purl":null,"source":"GHSA-q6j3-c4wc-63vw"},{"ecosystem":"PyPI","fixed":["0.46"],"introduced":["0"],"last_affected":[],"package":"datasette","purl":"pkg:pypi/datasette","source":"GHSA-q6j3-c4wc-63vw"}],"products":null,"published":"2020-08-11","related":[],"sources":[{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":null,"updated":null,"vendors":null},"summary":"Read-only form submissions leak CSRF tokens in URLs, potentially exposing them to attackers via referrer headers.","url":"https://insights.sbomify.com/GHSA-q6j3-c4wc-63vw/"}