CVE-2018-18625:
Grafana XSS via adding a link in General feature
6.1
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.73489%
CWE
Published
1/30/2024
Updated
1/30/2024
KEV Status
No
Technology
Go
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
github.com/grafana/grafana | go | < 6.0.0-beta1 | 6.0.0-beta1 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The XSS vulnerability arises from insufficient URL encoding in the TemplateSrv.formatValue
method when processing 'urlescape' or 'percentencode' formats. The 'urlescape' case used escape()
, which is insecure, and 'percentencode' used a custom encodeURIQueryValue
method that didn't properly encode all characters. These functions process
user input and output insufficiently escaped strings, which when rendered in links, allow XSS. The patches replaced these with proper encoding using encodeURIComponentStrict
, confirming the vulnerability in the original functions.