{"id":"CVE-2024-53257","aliases":["CVE-2024-53257","GHSA-7mwh-q3xm-qh6p","GO-2024-3306"],"related":[],"kind":"vulnerability","state":"published","title":"Vitess allows HTML injection in /debug/querylogz & /debug/env","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"### Summary\n\nThe `/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.\n\n### Details\n\nThese pages are rendered using `text/template` instead of rendering with a proper HTML templating engine.\n\n### PoC\n\nExecute 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. \n\nExample query that can trigger the issue:\n\n```sql\nUPDATE users\nSET\n    email = CONCAT(\"<img src=https://cataas.com/cat/says/oops>\", users.idUser, \"@xxx\")\nWHERE\n    email NOT LIKE '%xxx%' AND email != \"demo@xxx.com\"\n```\n\nResult: \n\n![image](https://github.com/user-attachments/assets/c583816b-157c-474e-bbed-152b3dc0372f)\n\n### Impact\n\nAnyone looking at the Vitess status page is affected. This would normally be owners / administrators of the Vitess cluster.\n\nAnyone 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.","format":"markdown","source":"ghsa"},{"lang":"en","text":"Vitess allows HTML injection in /debug/querylogz and /debug/env in vitess.io/vitess","format":"markdown","source":"go"},{"lang":"es","text":"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.","source":"nvd"}],"published":"2024-12-03T15:46:40.513Z","modified":"2026-08-07T08:12:28.318Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:N/I:H/A:N","score":4.9,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:N/I:H/A:N","score":4.9,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:N/I:H/A:N","score":4.9,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N","rating":"MEDIUM"}],"cwes":["CWE-79"],"affected":[{"ranges":[{"version":">= 0.21.0-rc1, < 21.0.1","status":"affected"},{"version":">= 0.20.0-rc1, < 20.0.4","status":"affected"},{"version":"< 19.0.8","status":"affected"}],"vendor":"vitessio","product":"vitess","source":"cvelist"},{"ranges":[{"type":"custom","introduced":"0","fixed":"19.0.8","status":"affected"},{"type":"custom","introduced":"19.0.9","fixed":"20.0.4","status":"affected"},{"type":"custom","introduced":"20.0.5","fixed":"21.0.1","status":"affected"}],"vendor":"vitessio","product":"vitess","cpe":"cpe:2.3:a:vitessio:vitess:*:*:*:*:*:*:*:*","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0.21.0-rc1","status":"affected","fixed":"0.21.1"}],"ecosystem":"Go","package":"vitess.io/vitess","purl":"pkg:golang/vitess.io/vitess","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0.20.0-rc1","status":"affected","fixed":"0.20.4"}],"ecosystem":"Go","package":"vitess.io/vitess","purl":"pkg:golang/vitess.io/vitess","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.19.8"}],"ecosystem":"Go","package":"vitess.io/vitess","purl":"pkg:golang/vitess.io/vitess","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.19.8"},{"type":"semver","introduced":"0.20.0","status":"affected","fixed":"0.20.4"},{"type":"semver","introduced":"0.21.0","status":"affected","fixed":"0.21.1"}],"ecosystem":"Go","package":"vitess.io/vitess","purl":"pkg:golang/vitess.io/vitess","source":"go"}],"references":[{"url":"https://github.com/vitessio/vitess/security/advisories/GHSA-7mwh-q3xm-qh6p","tags":["advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/vitessio/vitess/commit/2b71d1b5f8ca676beeab2875525003cd45096217","tags":["fix","web","x-refsource-misc"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-53257","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/vitessio/vitess","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"partial","date":"2024-12-03T16:53:09.581Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2024-53257","url":"https://www.cve.org/CVERecord?id=CVE-2024-53257","licence":"CVE Terms of Use","modified":"2024-12-03T16:57:59.604Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-7mwh-q3xm-qh6p","url":"https://github.com/advisories/GHSA-7mwh-q3xm-qh6p","licence":"CC-BY-4.0","modified":"2026-08-07T08:12:23.040Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2024-3306","url":"https://pkg.go.dev/vuln/GO-2024-3306","licence":"CC-BY-4.0","modified":"2026-08-07T08:12:28.318Z"},{"source":"nvd","name":"NVD","id":"CVE-2024-53257","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-53257","licence":"Public domain","modified":"2026-06-17T08:08:42.213Z"}],"updatedAt":"2026-11-25T22:58:49.667Z","epss":{"score":0.00439,"percentile":0.39918,"date":"2026-12-01T12:00:22.000Z"}}