{"id":"CVE-2026-45739","aliases":["CVE-2026-45739","GHSA-x97m-qp5c-w9xj","PYSEC-2026-2282"],"related":[],"kind":"vulnerability","state":"published","title":"Strawberry GraphQL: Default GraphiQL may expose HTTP headers in URLs","summary":"Strawberry GraphQL is a library for creating GraphQL APIs. In versions 0.288.4 through 0.315.3, Strawberry'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. Version 0.315.4 patches the issue.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Strawberry GraphQL is a library for creating GraphQL APIs. In versions 0.288.4 through 0.315.3, Strawberry'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. Version 0.315.4 patches the issue.","source":"cvelist"},{"lang":"en","text":"## 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`.","format":"markdown","source":"ghsa"},{"lang":"es","text":"Strawberry GraphQL es una biblioteca para crear APIs GraphQL. En las versiones 0.288.4 a 0.315.3, la plantilla GraphiQL incluida de Strawberry escribía valores del editor de encabezados de GraphiQL en la cadena de consulta URL del navegador. Si un usuario introducía un encabezado sensible, como 'Authorization: Bearer <token>', el valor podría volverse visible en el historial del navegador, enlaces copiados y registros de acceso del servidor/proxy/CDN después de una recarga de página o una solicitud compartida. La versión 0.315.4 corrige el problema.","source":"nvd"}],"published":"2026-05-19T15:55:07.000Z","modified":"2026-07-22T20:10:00.127Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:N/A:N","score":3.1,"rating":"LOW"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:N/A:N","score":3.1,"rating":"LOW"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:N/A:N","score":3.1,"rating":"LOW"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:N","score":4.3,"rating":"MEDIUM"},{"scorer":"PyPA Advisory Database","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:N","score":4.3,"rating":"MEDIUM"}],"cwes":["CWE-200","CWE-201"],"affected":[{"ranges":[{"version":">= 0.288.4, < 0.315.4","status":"affected"}],"vendor":"strawberry-graphql","product":"strawberry","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0.288.4","status":"affected","fixed":"0.315.4"}],"ecosystem":"PyPI","package":"strawberry-graphql","purl":"pkg:pypi/strawberry-graphql","source":"ghsa"},{"ranges":[{"status":"affected","introduced":"0.288.4","fixed":"0.315.4"}],"vendor":"strawberry","product":"strawberry_graphql","cpe":"cpe:2.3:a:strawberry:strawberry_graphql:*:*:*:*:*:python:*:*","source":"nvd"},{"ranges":[{"type":"ecosystem","introduced":"0.288.4","status":"affected","fixed":"0.315.4"}],"ecosystem":"PyPI","package":"strawberry-graphql","purl":"pkg:pypi/strawberry-graphql","source":"pysec"}],"references":[{"url":"https://github.com/strawberry-graphql/strawberry/security/advisories/GHSA-x97m-qp5c-w9xj","tags":["advisory","mitigation","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/strawberry-graphql/strawberry/issues/4398","tags":["issue-tracking","report","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/strawberry-graphql/strawberry/pull/2842","tags":["fix","issue-tracking","patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/strawberry-graphql/strawberry/commit/9315ef80a621ae50ca0bc5c82f560ca4ee7e47a9","tags":["fix","patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/strawberry-graphql/strawberry/releases/tag/0.315.4","tags":["advisory","product","release-notes","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-45739","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/strawberry-graphql/strawberry","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-06-04T14:35:44.208Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-45739","url":"https://www.cve.org/CVERecord?id=CVE-2026-45739","licence":"CVE Terms of Use","modified":"2026-06-04T14:36:06.010Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-x97m-qp5c-w9xj","url":"https://github.com/advisories/GHSA-x97m-qp5c-w9xj","licence":"CC-BY-4.0","modified":"2026-07-13T07:26:52.672Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-45739","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-45739","licence":"Public domain","modified":"2026-07-22T20:10:00.127Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2026-2282","url":"https://osv.dev/vulnerability/PYSEC-2026-2282","licence":"CC-BY-4.0","modified":"2026-07-13T07:15:44.042Z"}],"updatedAt":"2026-11-25T22:59:23.705Z","epss":{"score":0.00218,"percentile":0.13054,"date":"2026-12-01T12:00:22.000Z"}}