CVE-2024-28867: Un-sanitized metric name or labels can be used to take over exported metrics
In code which applies un-sanitized string values into metric names or labels, like this:
let lang = try? request.query-get(String.self, at: "lang")
Counter (
label: "language",
dimensions: [("lang", lang ?? "unknown" )]
)
an attacker could make use of this and send a ?lang
query parameter containing newlines, }
or similar characters which can lead to the attacker taking over the exported format – including creating unbounded numbers of stored metrics, inflating server memory usage, or causing “bogus” metrics.
References
Detect and mitigate CVE-2024-28867 with GitLab Dependency Scanning
Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →