Junglewise Threat Intelligence

CVE-2022-4728: PYSEC-2026-818 - Graphite Web Cross-site Scripting vulnerability

CVE-2022-4728 · Severity: low · CVSS 3.1 · Published 2026-07-07

Technologies: graphite-web (PyPI). Vendors: PyPI.

Executive brief

Graphite Web is a popular open-source monitoring and graphing tool used to visualize time-series data in production environments. A stored cross-site scripting (XSS) vulnerability in the cookie handler allows an attacker to inject malicious JavaScript that executes in the browser of any user viewing a dashboard, potentially leading to account compromise, session hijacking, or unauthorized actions taken on behalf of the victim.

Technical details

The vulnerability is a stored XSS flaw (CWE-79) in Graphite Web's Cookie Handler component, specifically in how the "Relative Time Range" parameter is processed and stored in the browser cookie `ys-defaultGraphParams`. The vulnerable code fails to properly sanitize or escape user-supplied input before storing it in the cookie and rendering it in the DOM. An attacker can inject arbitrary HTML and JavaScript payloads via the time range UI, which are then persisted in the cookie and executed whenever the dashboard is accessed. This requires an attacker to trick or socially engineer a user into visiting a malicious Graphite instance or modifying settings on an accessible instance. The vulnerability affects versions 0.9.5 through 1.1.10, and a patch (commit 2f178f490e10efc03cd1d27c72f64ecab224eb23) is available.

Affected products

  • Graphite Project Graphite Web 0.9.5 through 1.1.10

Timeline

  • 2022-04-13: disclosed: Vulnerability reported in GitHub issue #2744
  • 2022-12-27: advisory: GHSA-3c5x-4hvx-qrrr published
  • 2022-12-27: patched: Patch commit 2f178f490e10efc03cd1d27c72f64ecab224eb23 available

References

Related threats