Skip to content

Strawberry GraphQL: Default GraphiQL may expose HTTP headers in URLs

Low severity GitHub Reviewed Published May 13, 2026 in strawberry-graphql/strawberry • Updated May 19, 2026

Package

pip strawberry-graphql (pip)

Affected versions

>= 0.288.4, <= 0.315.3

Patched versions

0.315.4

Description

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.

References

@patrick91 patrick91 published to strawberry-graphql/strawberry May 13, 2026
Published to the GitHub Advisory Database May 19, 2026
Reviewed May 19, 2026
Last updated May 19, 2026

Severity

Low

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
High
Privileges required
None
User interaction
Required
Scope
Unchanged
Confidentiality
Low
Integrity
None
Availability
None

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:L/I:N/A:N

EPSS score

Weaknesses

Exposure of Sensitive Information to an Unauthorized Actor

The product exposes sensitive information to an actor that is not explicitly authorized to have access to that information. Learn more on MITRE.

Insertion of Sensitive Information Into Sent Data

The code transmits data to another actor, but a portion of the data includes sensitive information that should not be accessible to that actor. Learn more on MITRE.

CVE ID

CVE-2026-45739

GHSA ID

GHSA-x97m-qp5c-w9xj

Credits

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.