CVE-2024-53257
JSON

4.9medium

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

Severity
4.9medium CVSS:3.1 by GitHub_M
Exploit likelihood
0.44% (higher than 39% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-7mwh-q3xm-qh6pGO-2024-3306

Description

Vitess is a database clustering system for horizontal scaling of MySQL. 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. This vulnerability is fixed in 21.0.1, 20.0.4, and 19.0.8.

Affected

Product or packageVersionsReported by
vitessio vitess>= 0.21.0-rc1, < 21.0.1, >= 0.20.0-rc1, < 20.0.4, < 19.0.8, before 19.0.8, from 19.0.9 before 20.0.4, from 20.0.5 before 21.0.1CVE List
vitess.io/vitess (Go)from 0.21.0-rc1 before 0.21.1, from 0.20.0-rc1 before 0.20.4, before 0.19.8, from 0.20.0 before 0.20.4, from 0.21.0 before 0.21.1GitHub Advisory Database, Go Vulnerability Database

All scores

GitHub_M4.9medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:N/I:H/A:N
GitHub4.9medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:N/I:H/A:N
GitHubmedium CVSS:4.0CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N

Classification

CWE-79

SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial.

What each source says

CVE List

Vitess is a database clustering system for horizontal scaling of MySQL. 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. This vulnerability is fixed in 21.0.1, 20.0.4, and 19.0.8.

GitHub Advisory Database
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 != "demo@xxx.com"

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.

Go Vulnerability Database

Vitess allows HTML injection in /debug/querylogz and /debug/env in vitess.io/vitess

NVD (es)

Vitess es un sistema de agrupamiento de bases de datos para el escalamiento horizontal de MySQL. Las páginas /debug/querylogz y /debug/env para vtgate y vttablet no escapan correctamente a la entrada del usuario. El resultado es que las consultas ejecutadas por Vitess pueden escribir HTML en la página de monitoreo a voluntad. Estas páginas se representan utilizando text/template en lugar de hacerlo con un motor de plantillas HTML adecuado. Esta vulnerabilidad se solucionó en 21.0.1, 20.0.4 y 19.0.8.

References

Sources

SourceRecordLicence
CVE ListCVE-2024-53257 changed 2024-12-03CVE Terms of Use
GitHub Advisory DatabaseGHSA-7mwh-q3xm-qh6p changed 2026-08-07CC-BY-4.0
Go Vulnerability DatabaseGO-2024-3306 changed 2026-08-07CC-BY-4.0
NVDCVE-2024-53257 changed 2026-06-17Public domain