Advisory

GHSA-7mwh-q3xm-qh6p

Also known as: CVE-2024-53257, GO-2024-3306

Summary

Vitess allows HTML injection in /debug/querylogz & /debug/env

Details

Summary

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.

Details

These pages are rendered using text/template instead of rendering with a proper HTML templating engine.

PoC

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:

UPDATE users
SET
    email = CONCAT("<img src=https://cataas.com/cat/says/oops>", users.idUser, "@xxx")
WHERE
    email NOT LIKE '%xxx%' AND email != "[email protected]"

Result:

image

Impact

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.

Severity

Medium Basis: The source's own band: MODERATE

Dates

Published
2024-12-03 18:43 UTC
Modified
2026-08-07 08:12 UTC

Affected packages and fixes

vitess.io/vitess

Go · All systems

Affected

  • introduced 0.21.0-rc1, fixed 0.21.1 (semver)

Fixed versions

0.21.1

Fix

vitess.io/vitess

Go · All systems

Affected

  • introduced 0.20.0-rc1, fixed 0.20.4 (semver)

Fixed versions

0.20.4

Fix

vitess.io/vitess

Go · All systems

Affected

  • introduced 0, fixed 0.19.8 (semver)

Fixed versions

0.19.8

Fix

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences