Strawberry GraphQL: Default GraphiQL may expose HTTP headers in URLs
Summary
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.
Affected Versions
- Affected:
strawberry-graphql >= 0.288.4, <= 0.315.3 - Patched: 0.315.4
The vulnerable behavior was introduced by the GraphiQL URL-sharing implementation in commit 9315ef80, first included in release 0.288.4.
Impact
Applications 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.
The 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.
Technical Details
The 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.
Before the fix, header values were handled like shareable query text and variables:
const [headers, setHeaders] = React.useState(parameters.headers);
function onEditHeaders(newHeaders) {
setHeaders(newHeaders);
updateURL({ headers: newHeaders });
}
This meant arbitrary header text entered into the IDE could be serialized into ?headers=....
Fix
The 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.
Workarounds
Until a patched version can be used, applications can mitigate this issue by disabling the bundled IDE in production:
GraphQLRouter(schema, graphql_ide=None)
Equivalent graphql_ide=None configuration is available in Strawberry's other HTTP integrations.
Applications can also provide a custom GraphiQL template that does not serialize header values into the URL.
Credits
Reported by @lpschroer.
Software afectado
Haz clic en una tecnología para ver todas sus vulnerabilidades.
| Plataforma | Paquete | Versiones vulnerables | Corregida en |
|---|---|---|---|
| Python (PyPI) | strawberry-graphql | >= 0.288.4, < 0.315.4 | 0.315.4 |
Referencias
- https://github.com/strawberry-graphql/strawberry/releases/tag/0.315.4
- https://github.com/strawberry-graphql/strawberry/security/advisories/GHSA-x97m-qp5c-w9xj
- https://github.com/strawberry-graphql/strawberry/issues/4398
- https://github.com/strawberry-graphql/strawberry/commit/9315ef80a621ae50ca0bc5c82f560ca4ee7e47a9
- https://github.com/strawberry-graphql/strawberry/pull/2842
- https://nvd.nist.gov/vuln/detail/CVE-2026-45739
- https://github.com/strawberry-graphql/strawberry
- Vector CVSS
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:N/A:N- Debilidad (CWE)
CWE-200, CWE-201- Plataforma
- Python (PyPI)
- Paquete
strawberry-graphql- Publicada
- 19.05.2026
- Actualizado
- 11.10.2026 14:17
Fuentes y licencias
OSV / GitHub Advisory Database - PYSEC-2026-2282 - PyPA Advisory Database; CC BY 4.0
OSV / GitHub Advisory Database - GHSA-x97m-qp5c-w9xj - CC BY 4.0
Historial de vulnerabilidades: strawberry-graphql
Todas las vulnerabilidades publicadas de este paquete (Python (PyPI)), de la más reciente a la más antigua. Muestra si es un fallo aislado o un paquete que hay que vigilar.
- Entradas en total
- 9
- Primera → última
- 09.2024 10.2026
- Sin corrección
- 0
- Explotada en ataques
- 0
Distribución por gravedad
- Alta 3
- Media 3
- Baja 3
Divulgaciones por año
- 2024: 1
- 2025: 1
- 2026: 7
-
Strawberry GraphQL: Default GraphiQL may expose HTTP headers in URLs esta entrada
Identifica las vulnerabilidades de tu aplicación
Con la integración de DockRay y el inventario de software activado, DockRay compara las versiones notificadas de los componentes con las vulnerabilidades conocidas y avisa de las coincidencias confirmadas. La cobertura depende de la tecnología compatible y de los avisos disponibles.