Summary
CSRF tokens leaked in URL by canned query form
Workarounds
You can fix this issue in a Datasette instance without upgrading by copying the 0.46 query.html template into a custom templates/ directory and running Datasette with the --template-dir=templates/ option.
References
Issue 918 discusses this in details: https://github.com/simonw/datasette/issues/918
For more information
Contact swillison at gmail with any questions.
Impact
The HTML form for a read-only canned query includes the hidden CSRF token field added in #798 for writable canned queries (#698).
This 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:
https://latest.datasette.io/fixtures/neighborhood_search?text=down&csrftoken=CSRFTOKEN-HERE
This 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.
GHSA-Q6J3-C4WC-63VW has a CVSS score of 4.3 (Medium). The vector is network-reachable, no privileges required, and user interaction required. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (0.46); upgrading removes the vulnerable code path.
Affected versions
Security releases
Kodem intelligence
Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.
Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.
Already deployed Kodem?
See it in your environmentNew to Kodem? Get a demo →Remediation advice
A fix for this issue has been released in Datasette 0.46.
Frequently Asked Questions
- What is GHSA-Q6J3-C4WC-63VW? GHSA-Q6J3-C4WC-63VW is a medium-severity security vulnerability in datasette (pip), affecting versions < 0.46. It is fixed in 0.46.
- How severe is GHSA-Q6J3-C4WC-63VW? GHSA-Q6J3-C4WC-63VW has a CVSS score of 4.3 (Medium). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
- Which versions of datasette are affected by GHSA-Q6J3-C4WC-63VW? datasette (pip) versions < 0.46 is affected.
- Is there a fix for GHSA-Q6J3-C4WC-63VW? Yes. GHSA-Q6J3-C4WC-63VW is fixed in 0.46. Upgrade to this version or later.
- Is GHSA-Q6J3-C4WC-63VW exploitable, and should I be worried? Whether GHSA-Q6J3-C4WC-63VW is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
- What actually determines whether GHSA-Q6J3-C4WC-63VW is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
- How do I fix GHSA-Q6J3-C4WC-63VW? Upgrade
datasetteto 0.46 or later.