# CVE-2026-42794: Reflected XSS via backslash bypass in GraphiQL js_escape in absinthe_plug

> Attackers can execute arbitrary JavaScript in victims' browsers via reflected XSS in the GraphiQL interface due to improper backslash escaping.

- **Severity:** Low 2.3 (`CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 8 May 2026
- **Updated:** 16 May 2026
- **Also known as:** EEF-CVE-2026-42794, GHSA-c62g-j346-39v5

## What is CVE-2026-42794?

CVE-2026-42794 is a low-severity cross-site scripting vulnerability in absinthe-graphql absinthe_plug, published on 8 May 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

### Official 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 before 1.5.10.

Weakness: CWE-79 (Improper Neutralization of Input During Web Page Generation)

## Which versions are affected by CVE-2026-42794?

3 open source packages ship an affected version, including absinthe_plug. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `absinthe_plug` | Hex | From 1.2.0 to 1.5.9 | None |
| `absinthe_plug` | Hex | From 1.2.0 to 1.5.9 | None |
| `absinthe_plug` | Hex | From 1.2.0 | 1.5.10 |

Products: Absinthe-Graphql Absinthe.plug.

## How do I fix CVE-2026-42794?

Upgrade absinthe_plug to 1.5.10 or later.

## Is CVE-2026-42794 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-42794 exists.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-42794 and fix it if it is affected.

What it is: CVE-2026-42794 is a low-severity cross-site scripting vulnerability in absinthe-graphql absinthe_plug, published on 8 May 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-42794 exists.

Affected packages and fixed versions:
- absinthe_plug (Hex): affected from 1.2.0 up to 1.5.9; no fix listed
- absinthe_plug (Hex): affected from 1.2.0 up to 1.5.9; no fix listed
- absinthe_plug (Hex): affected from 1.2.0; fixed in 1.5.10

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-42794/ (Markdown: https://insights.sbomify.com/CVE-2026-42794/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-42794
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-42794
- OSV: https://osv.dev/vulnerability/CVE-2026-42794

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-42794/
Summaries are generated and may contain mistakes; the official description above is the record.
