CVE-2026-42794
Reflected XSS via backslash bypass in GraphiQL js_escape in absinthe_plug
Weakness Type (CWE)
CWE-79 — CWE-79 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
CAPEC
Vulnerability description
Improper Neutralization of Input During Web Page Generation (XSS) vulnerability in absinthe-graphql absinthe_plug allows reflected cross-site scripting via the GraphiQL interface.'Elixir.Absinthe.Plug.GraphiQL':js_escape/1 in lib/absinthe/plug/graphiql.ex escapes single quotes and newlines in the query GET parameter before embedding it in an inline JavaScript string, but does not escape backslashes. An attacker can bypass the escaping by prefixing a quote with a backslash (e.g. \'), breaking out of the string context and executing arbitrary JavaScript in the victim's browser.
This issue affects absinthe_plug: from 1.2.0.
Affected
pkg:hex/absinthe_plug
| Module | Source File | Routine |
|---|---|---|
Absinthe.Plug.GraphiQL
|
lib/absinthe/plug/graphiql.ex
|
Absinthe.Plug.GraphiQL.js_escape/1
|
pkg:github/absinthe-graphql/absinthe_plug
| Module | Source File | Routine |
|---|---|---|
Absinthe.Plug.GraphiQL
|
lib/absinthe/plug/graphiql.ex
|
Absinthe.Plug.GraphiQL.js_escape/1
|
| Status | Type | Version | Changes / Fixed in |
|---|---|---|---|
| affected | git ⓘ | 26241817cb
|
< 23a0d5658d
|
Configurations
The application must mount Absinthe.Plug.GraphiQL on a route that is reachable by untrusted users. The GraphiQL interface is a developer tool and is typically disabled or restricted in production deployments.
References
- https://github.com/absinthe-graphql/absinthe_plug/issues/275 vendor-advisory
- https://osv.dev/vulnerability/EEF-CVE-2026-42794 related
- https://github.com/absinthe-graphql/absinthe_plug/commit/23a0d5658d32420086711adf4ce8f05febb09963 patch
Credits
- Finder: 40826d
- Finder: Bryan A. Enders
- Remediation developer: Leandro Moreno
- Remediation reviewer: Ben Wilson
CVE record as JSON:
GET /cves/CVE-2026-42794.json
OSV record as JSON:
GET /osv/EEF-CVE-2026-42794.json