Skip to content

Fix CVE-2024-53382 - PrismJS - Grafana - plugins/datasource #101587

@rgoltz

Description

@rgoltz

Why is this needed:

Prism (aka PrismJS) through 1.29.0 allows DOM Clobbering (with resultant XSS for untrusted input that contains HTML but does not directly contain JavaScript), because document.currentScript lookup can be shadowed by attacker-injected HTML elements.

This issue is assinged to CVE-2024-53382. Following a current scan of the Docker-Image, Grafana is using this package.

Details from Image-Scan

Package Name prismjs
Vulnerability ID https://nvd.nist.gov/vuln/detail/CVE-2024-53382
OSV Advisory Link https://osv.dev/vulnerability/GHSA-x7hr-w5r2-h6wg
Severity Medium
Installed version v1.29.0
Fixed version tbd
Package Manager NODE
File paths
  • /usr/share/grafana/public/app/plugins/datasource/azuremonitor/package.json
  • /usr/share/grafana/public/app/plugins/datasource/cloud-monitoring/package.json
  • /usr/share/grafana/public/app/plugins/datasource/grafana-pyroscope-datasource/package.json
  • /usr/share/grafana/public/app/plugins/datasource/tempo/package.json
Affected Code in PrismJS https://github.com/PrismJS/prism/blob/59e5a3471377057de1f401ba38337aca27b80e03/prism.js#L226-L259

Who is this feature for?
For security and secure operation of Grafana. We should wait for a fix or mitigation and track this progress (at prismjs) here. May we should create a PR, after a fixed version is available. In case Grafana is not affected of this XSS issue, a short statement would help users here as well.

References

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions