CVE-2024-53257: Vitess.io/vitess Vitess Allows HTML Injection Vulnerability
MODERATECVE-2024-53257 is a MODERATE (CVSS 4.9) vitess allows html injection vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Vitess.io/vitess libraries in the Go ecosystem. The issue involves vitess allows html injection in /debug/querylogz & /debug/env. Remediation is available by upgrading affected packages to version 0.21.1, 0.20.4, 0.19.8.
CVE-2024-53257 at a Glance
Security Impact
CVSS: 4.9
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:N/I:H/A:N).
How to Fix CVE-2024-53257
To remediate this vulnerability, upgrade all affected Vitess.io/vitess dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade vitess.io/vitess to 0.21.1
Upgrade vitess.io/vitess to 0.20.4
Upgrade vitess.io/vitess to 0.19.8
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for vitess.io/vitess
How to Check if You Are Affected
To determine whether your application is affected by CVE-2024-53257, inspect your project dependencies for Vitess.io/vitess:
inspect dependencies for vitess.io/vitess
Analyze the terminal output to locate any version of Vitess.io/vitess in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.21.1), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'), where the product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. In Vitess.io/vitess, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2024-53257 Affected Vitess.io/vitess Versions
3 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
vitess.io/vitess
|
Go |
≥ 0.21.0-rc1
< 0.21.1
|
0.21.1
|
|
vitess.io/vitess
|
Go |
≥ 0.20.0-rc1
< 0.20.4
|
0.20.4
|
|
vitess.io/vitess
|
Go |
< 0.19.8
|
0.19.8
|
References
Frequently Asked Questions
What is CVE-2024-53257?
Which Vitess.io/vitess versions are affected?
What version fixes CVE-2024-53257?
Is vitess.io/vitess affected?
What is the CVSS score of CVE-2024-53257?
What CWE is associated with CVE-2024-53257?
How can I check Go dependencies for CVE-2024-53257?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-7mwh-q3xm-qh6p",
"modified" : "2024-12-16T15:26:04Z",
"published" : "2024-12-03T18:43:33Z",
"aliases" : [ "CVE-2024-53257" ],
"summary" : "Vitess allows HTML injection in /debug/querylogz & /debug/env",
"details" : "### 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\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.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:N/I:H/A:N"
}, {
"type" : "CVSS_V4",
"score" : "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"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "vitess.io/vitess"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0.21.0-rc1"
}, {
"fixed" : "0.21.1"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Go",
"name" : "vitess.io/vitess"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0.20.0-rc1"
}, {
"fixed" : "0.20.4"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Go",
"name" : "vitess.io/vitess"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.19.8"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/vitessio/vitess/security/advisories/GHSA-7mwh-q3xm-qh6p"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-53257"
}, {
"type" : "WEB",
"url" : "https://github.com/vitessio/vitess/commit/2b71d1b5f8ca676beeab2875525003cd45096217"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/vitessio/vitess"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-79" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2024-12-03T18:43:33Z",
"nvd_published_at" : "2024-12-03T16:15:23Z"
}
}