CVE-2026-104252: Vitess vttablet /twopcz reflected XSS
The twopczHandler in
go/vt/vttablet/tabletserver/twopcz.go (line 185) reflects the Action
and dtid form values directly into the HTML response body via
fmt.Fprintln(w, msg) — without HTML escaping. The response is served
as text/html; charset=utf-8, and Vitess’s default acl policy is
allow-all, so the endpoint is reachable by anyone who can hit the
vttablet’s HTTP port (default 15999, multiplexed with gRPC and MySQL
wire-protocol ports).
A crafted Action or dtid value yields a reflected XSS that
executes in the operator’s browser with same-origin access to the
vttablet’s debug endpoints. This includes /queryz (live query plans),
/querylogz (recent queries with bound values), /txlogz (transactions),
/debug/env (environment variables — may include MySQL/topology
credentials), /debug/vars (expvar stats), and /debug/pprof/* if
enabled.
The bug was introduced before v20.0.0 (long-standing) and was silently
fixed in commit 3140c1846c (merged 2026-06-09, PR #20255,
“tabletserver: escape reflected form values in twopcz handler”). The
fix replaces fmt.Fprintln(w, msg) with
fmt.Fprintln(w, html.EscapeString(msg)). No released version of
Vitess contains the fix — the fix lives only on main (current tip
33a3c0fafe69, 2026-06-23). There is no CVE, GHSA, or OSV entry
for this specific bug (verified 2026-06-24 against GitHub Advisory
Database, OSV.dev, and NVD).
References
- github.com/advisories/GHSA-v75v-6fpf-gvw8
- github.com/vitessio/vitess/commit/3140c1846cd120db34f33b2083139b4ab638aed2
- github.com/vitessio/vitess/commit/976e1e0d78f9d29d02e5e31b4aa7e180648f08af
- github.com/vitessio/vitess/commit/c1ed96302e658190168c971afdac730cf70e43f7
- github.com/vitessio/vitess/pull/20255
- github.com/vitessio/vitess/pull/20273
- github.com/vitessio/vitess/pull/20274
- github.com/vitessio/vitess/releases/tag/v23.0.5
- github.com/vitessio/vitess/releases/tag/v24.0.2
- github.com/vitessio/vitess/security/advisories/GHSA-v75v-6fpf-gvw8
- nvd.nist.gov/vuln/detail/CVE-2026-104252
Code Behaviors & Features
Detect and mitigate CVE-2026-104252 with GitLab Dependency Scanning
Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →