{"id":"CVE-2026-45739","aliases":["GHSA-x97m-qp5c-w9xj","PYSEC-2026-2282"],"title":"Strawberry GraphQL: Default GraphiQL may expose HTTP headers in URLs","summary":"Strawberry GraphQL: Default GraphiQL may expose HTTP headers in URLs","severity":"low","cvss":3.1,"cvssVector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:N/A:N","vendor":"strawberry-graphql","product":"strawberry-graphql","ecosystem":"pip","affected":["strawberry-graphql >= 0.288.4, < 0.315.4"],"patched":["strawberry-graphql 0.315.4"],"published":"2026-05-19","updated":"2026-07-13","source":"OSV","sourceUrl":"https://osv.dev/vulnerability/GHSA-x97m-qp5c-w9xj","references":[{"url":"https://github.com/strawberry-graphql/strawberry/security/advisories/GHSA-x97m-qp5c-w9xj"},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-45739"},{"url":"https://github.com/strawberry-graphql/strawberry/issues/4398"},{"url":"https://github.com/strawberry-graphql/strawberry/pull/2842"},{"url":"https://github.com/strawberry-graphql/strawberry/commit/9315ef80a621ae50ca0bc5c82f560ca4ee7e47a9"},{"url":"https://github.com/strawberry-graphql/strawberry"},{"url":"https://github.com/strawberry-graphql/strawberry/releases/tag/0.315.4"}],"tags":["osv","pip"],"epss":0.0036,"epssPercentile":0.27018,"ingestedAt":"2026-07-13T18:58:05.056Z","slug":"CVE-2026-45739","body":"## Overview\n\n## Summary\n\nStrawberry's bundled GraphiQL template wrote values from the GraphiQL headers editor into the browser URL query string. If a user entered a sensitive header, such as `Authorization: Bearer <token>`, the value could become visible in browser history, copied links, and server/proxy/CDN access logs after a page reload or shared request.\n\n## Affected Versions\n\n- Affected: `strawberry-graphql >= 0.288.4, <= 0.315.3`\n- Patched: 0.315.4\n\nThe vulnerable behavior was introduced by the GraphiQL URL-sharing implementation in commit `9315ef80`, first included in release `0.288.4`.\n\n## Impact\n\nApplications that expose Strawberry's default GraphiQL IDE may leak sensitive HTTP header values entered by users into the GraphiQL headers editor. The default IDE is enabled by `graphql_ide=\"graphiql\"` across Strawberry HTTP integrations unless disabled or replaced by the application.\n\nThe exposure is limited to the browser-based IDE. GraphQL query execution is not affected, and this issue does not allow an attacker to directly execute operations or bypass authorization. Practical exploitation requires a user to enter a secret into the GraphiQL headers editor and then expose the resulting URL, for example by refreshing the page, copying the URL, sharing the URL, or causing the URL to be recorded by logging infrastructure.\n\n## Technical Details\n\nThe bundled `strawberry/static/graphiql.html` template parsed URL query parameters into a `parameters` object and used those values to initialize GraphiQL state. It also updated the URL on editor changes using `history.replaceState`.\n\nBefore the fix, header values were handled like shareable query text and variables:\n\n```js\nconst [headers, setHeaders] = React.useState(parameters.headers);\n\nfunction onEditHeaders(newHeaders) {\n  setHeaders(newHeaders);\n  updateURL({ headers: newHeaders });\n}\n```\n\nThis meant arbitrary header text entered into the IDE could be serialized into `?headers=...`.\n\n## Fix\n\nThe GraphiQL template no longer calls `updateURL` from `onEditHeaders`. Query and variable URL sharing remain unchanged, and existing URLs with `headers=...` can still initialize the headers editor. Header persistence via GraphiQL's own `shouldPersistHeaders: true` behavior remains enabled, so newly edited headers can still persist locally without being placed in the URL.\n\n## Workarounds\n\nUntil a patched version can be used, applications can mitigate this issue by disabling the bundled IDE in production:\n\n```python\nGraphQLRouter(schema, graphql_ide=None)\n```\n\nEquivalent `graphql_ide=None` configuration is available in Strawberry's other HTTP integrations.\n\nApplications can also provide a custom GraphiQL template that does not serialize header values into the URL.\n\n## Credits\n\nReported by `@lpschroer`.\n\n## Affected packages\n\n- `strawberry-graphql >= 0.288.4, < 0.315.4`\n\n## Remediation\n\nUpgrade to a patched release:\n\n- `strawberry-graphql 0.315.4`","depth":"sunlit","depthScore":17,"depthScoreParts":{"impact":17.1,"likelihood":0.1,"exploitation":0,"ransomware":0},"changes":[]}