Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
rgoltz opened this issue Mar 4, 2025 · 4 comments
Closed

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

rgoltz opened this issue Mar 4, 2025 · 4 comments

Comments

@rgoltz
Copy link
Contributor

rgoltz commented Mar 4, 2025

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

@simonc6372
Copy link
Contributor

Hi @rgoltz
Thanks for taking the time to report the issue. We're aware of this CVE from our internal scanning, and when there's a fix version published we will bump the dependencies. Due to the apparent lack of recent activity in the Prism project and therefore potentially long time for a fix to be released, we'll be taking a look at the impact on Grafana, and act accordingly.

For future security issues, (even if they are detectable with public information like this one) could you please report it via the instructions on the security tab, which you can also reach when you select "Report a security" issue from the New Issues menu.

@adrapereira adrapereira self-assigned this Mar 10, 2025
@rgoltz
Copy link
Contributor Author

rgoltz commented Mar 11, 2025

Hello @simonc6372 and @adrapereira 

The new release of PrismJS 1.30.0 has been released: https://github.com/PrismJS/prism/releases/tag/v1.30.0 - Following the changelog, it's covering the CVE issue.

Furthermore, your Bots also working at night and already created PRs:

:-)

@zoltanbedi
Copy link
Member

is this good to close then? @adrapereira

@adrapereira
Copy link
Contributor

Yes, we can close this issue.

@github-project-automation github-project-automation bot moved this from Incoming to Done in Partner Datasources Mar 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

No branches or pull requests

5 participants