Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB
CVE-2026-104252 Overview
CVE-2026-104252 is a reflected cross-site scripting (XSS) vulnerability in Vitess, a database clustering system for horizontal scaling of MySQL. The twopczHandler function in go/vt/vttablet/tabletserver/twopcz.go writes the Action and dtid form values from the /twopcz HTTP debug endpoint into a text/html response without HTML escaping. Under the default allow-all ACL policy, a remote unauthenticated attacker can craft a request that executes JavaScript in an operator's browser. The flaw affects Vitess versions prior to 23.0.5 and 24.0.2.
Critical Impact
Script executes with the vttablet debug origin and can read same-origin diagnostic endpoints exposing query, transaction, environment, variable, or profiling data.
Affected Products
- Vitess versions prior to 23.0.5
- Vitess versions prior to 24.0.2
- vttablet and vtcombo components exposing the /twopcz debug endpoint
Discovery Timeline
- 2026-10-13 - CVE-2026-104252 published to NVD
- 2026-10-13 - Last updated in NVD database
Technical Details for CVE-2026-104252
Vulnerability Analysis
The vulnerability resides in the two-phase commit debug handler of vttablet and vtcombo. The twopczHandler function reads Action and dtid form parameters from an incoming HTTP request. It then writes those values directly into an HTML response without applying HTML entity encoding. This classifies as a reflected cross-site scripting flaw under [CWE-79].
Because Vitess ships with an allow-all access control list (ACL) policy by default, the /twopcz endpoint is reachable by unauthenticated clients in typical deployments. An attacker tricks a Vitess operator into opening a crafted URL. The browser renders attacker-controlled markup inside the vttablet debug origin.
Once executing in that origin, the injected script can issue same-origin requests to adjacent diagnostic endpoints. These endpoints expose query logs, transaction state, environment variables, runtime variables, and profiling data. The result is unauthenticated information disclosure and potential cluster reconnaissance from the operator's session.
Root Cause
The handler used Go's fmt package to interpolate form values into an HTML response rather than applying HTML escaping. The upstream fix imports the standard library html package and escapes reflected input before writing it to the response.
Attack Vector
The attack requires network reachability to the vttablet or vtcombo debug HTTP endpoint and social engineering to deliver the crafted URL to an operator. No authentication is required under the default ACL policy.
// Patch diff from go/vt/vttablet/tabletserver/twopcz.go
import (
"encoding/json"
"fmt"
+ "html"
"net/http"
"github.com/google/safehtml/template"
// Source: https://github.com/vitessio/vitess/commit/3140c1846cd120db34f33b2083139b4ab638aed2
The patch adds the html package import so reflected form values can be escaped before being written into the text/html response.
Detection Methods for CVE-2026-104252
Indicators of Compromise
- HTTP requests to /twopcz on vttablet or vtcombo containing Action or dtid parameters with <script>, onerror=, javascript:, or URL-encoded angle brackets (%3C, %3E).
- Referer headers on debug endpoints originating from external or unexpected domains following an operator click.
- Unusual sequential access to same-origin diagnostic endpoints (/debug/vars, /queryz, /txlogz, /env) from an operator session shortly after a /twopcz request.
Detection Strategies
- Deploy web application firewall rules that inspect query strings and form bodies on Vitess debug paths for HTML and script metacharacters.
- Enable access logging on vttablet and vtcombo and alert on requests to /twopcz from outside administrative networks.
- Review browser-side content security policy (CSP) reports for script-src violations originating from the vttablet debug origin.
Monitoring Recommendations
- Correlate operator workstation browser telemetry with vttablet HTTP logs to identify reflected payloads reaching an operator session.
- Track outbound requests from vttablet diagnostic endpoints to detect data exfiltration patterns following successful script execution.
How to Mitigate CVE-2026-104252
Immediate Actions Required
- Upgrade Vitess to version 23.0.5 or 24.0.2, which contain the fix for the twopczHandler reflected XSS.
- Restrict access to vttablet and vtcombo HTTP debug endpoints to administrative networks using firewall or ingress rules.
- Replace the default allow-all ACL policy with an explicit allow-list that limits who can reach debug endpoints.
Patch Information
The fix is delivered in Vitess Release v23.0.5 and Vitess Release v24.0.2. The code changes are tracked in Pull Request #20255, Pull Request #20273, and Pull Request #20274. Technical details are available in the GitHub Security Advisory GHSA-v75v-6fpf-gvw8.
Workarounds
- Disable the /twopcz HTTP debug endpoint if two-phase commit introspection is not required in the deployment.
- Place vttablet and vtcombo behind an authenticating reverse proxy that rejects unauthenticated requests to debug paths.
- Instruct operators not to open externally supplied links that target internal Vitess diagnostic endpoints.
# Example ingress restriction limiting /twopcz to an admin CIDR
location /twopcz {
allow 10.0.0.0/8;
deny all;
proxy_pass http://vttablet_upstream;
}
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.
Sources: National Vulnerability Database, CISA KEV, Exploit-DB

