vitess-18.0
Chainguard
Vitess allows HTML injection in /debug/querylogz & /debug/env
The /debug/querylogz
and /debug/env
pages for vtgate
and vttablet
do not properly escape user input. The result is that queries executed by Vitess can write HTML into the monitoring page at will.
These pages are rendered using text/template
instead of rendering with a proper HTML templating engine.
Execute any query where part of it is HTML markup, for example as part of a string. To make it easier to observe you might want to make sure the query takes a few seconds to complete, giving you time to refresh the status page.
Example query that can trigger the issue:
Result:
Anyone looking at the Vitess status page is affected. This would normally be owners / administrators of the Vitess cluster.
Anyone that can influence what text show up in queries can trigger it. This would normally be pretty much everybody interacting with a system that uses Vitess as a backend.