{"answers":{"affected":"2 open source packages ship an affected version, including github.com/jaegertracing/jaeger.","exploited":"There is no known exploitation of GHSA-2w8w-qhg4-f78j in the wild and no public exploit code.","fix":"Upgrade github.com/jaegertracing/jaeger to 1.47.0 or later.","what":"GHSA-2w8w-qhg4-f78j is a cross-site scripting vulnerability in github.com/jaegertracing/jaeger, published on 11 Jul 2023. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for GHSA-2w8w-qhg4-f78j and fix it if it is affected.\n\nWhat it is: GHSA-2w8w-qhg4-f78j is a cross-site scripting vulnerability in github.com/jaegertracing/jaeger, published on 11 Jul 2023. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.\nExploitation: There is no known exploitation of GHSA-2w8w-qhg4-f78j in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- github.com/jaegertracing/jaeger (Go): affected all versions; fixed in 1.47.0\n- github.com/jaegertracing/jaeger (Go): affected all versions; fixed in 1.47.0\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/GHSA-2w8w-qhg4-f78j/ (Markdown: https://insights.sbomify.com/GHSA-2w8w-qhg4-f78j/index.md)","id":"GHSA-2w8w-qhg4-f78j","markdown":"https://insights.sbomify.com/GHSA-2w8w-qhg4-f78j/index.md","name":"GHSA-2w8w-qhg4-f78j","record":{"aliases":[],"analysis":{"component_type":"web_application","fix_type":"upgrade","impacts":["code_execution","security_bypass"],"network_reachable":"yes","non_default_config":false,"product_category":"Jaeger UI","requires_auth":"none","summary":"Stored XSS in Jaeger UI allows attackers to execute arbitrary JavaScript via malicious trace attributes, potentially compromising user sessions.","user_interaction":"required","vuln_class":"xss"},"analysis_generated_by":"qwen3.8-flash-next","assigner":null,"cpe":[],"cvss":{"score":null,"severity":null,"source":null,"vector":null,"version":null},"cwes":[],"description":"Related UI vulnerability advisory: https://github.com/jaegertracing/jaeger-ui/security/advisories/GHSA-vv24-rm95-q56r\n\n### Summary\nJaeger 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. \n\n### Details\nThe vulnerable line is here: https://github.com/jaegertracing/jaeger-ui/blob/main/packages/jaeger-ui/src/components/TracePage/TraceTimelineViewer/SpanDetail/KeyValuesTable.tsx#L49\n\n### PoC\n\n1. Start a Jaeger UI\n2. Save the following trace as a file:\n```json\n{\n    \"data\": [\n        {\n            \"traceID\": \"076ef819cc06c45a\",\n            \"spans\": [\n                {\n                    \"traceID\": \"076ef819cc06c45a\",\n                    \"spanID\": \"076ef819cc06c45a\",\n                    \"flags\": 1,\n                    \"operationName\": \"and open 'attributes'\",\n                    \"references\": [],\n                    \"startTime\": 1678196149232010,\n                    \"duration\": 13485,\n                    \"tags\": [\n                        {\n                            \"key\": \"sampler.type\",\n                            \"type\": \"string\",\n                            \"value\": \"{\\\"\u003cimg src=x onerror=alert(1)\u003e\\\":\\\"test\\\"}\"\n                        }\n                    ],\n                    \"logs\": [],\n                    \"processID\": \"p1\",\n                    \"warnings\": null\n                }\n            ],\n            \"processes\": {\n                \"p1\": {\n                    \"serviceName\": \"click here\",\n                    \"tags\": [\n                    ]\n                }\n            },\n            \"warnings\": null\n        }\n    ],\n    \"total\": 0,\n    \"limit\": 0,\n    \"offset\": 0,\n    \"errors\": null\n}\n```\n3. Upload that trace to Jaeger UI in order to visualise it.\n4. Open the trace, open it's span's attributes.\n5. XSS should be fired.\n\n### Impact\n\nThis is a XSS on Jaeger UI. XSS can be used to run JavaScript.","ecosystems":["Go"],"exploits":{"exploitdb":null,"first_seen":null,"github_poc":null,"max_poc_stars":null,"metasploit":null,"nuclei":null,"refs":[],"tier":null},"has_fix":true,"headline":"A stored XSS in jaeger UI might allow an attacker who controls a trace to perform arbitrary jaeger queries","id":"GHSA-2w8w-qhg4-f78j","indexable":true,"kev":null,"kind":"advisory","links":{"ecosystem":"Go","product":null,"products":[],"type":"xss","year":"2023"},"n_packages":2,"n_references":null,"packages":[{"ecosystem":"Go","fixed":["1.47.0"],"introduced":["0"],"last_affected":[],"package":"github.com/jaegertracing/jaeger","purl":null,"source":"GHSA-2w8w-qhg4-f78j"},{"ecosystem":"Go","fixed":["1.47.0"],"introduced":["0"],"last_affected":[],"package":"github.com/jaegertracing/jaeger","purl":"pkg:golang/github.com/jaegertracing/jaeger","source":"GHSA-2w8w-qhg4-f78j"}],"products":null,"published":"2023-07-11","related":[],"sources":[{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":null,"updated":null,"vendors":null},"summary":"Stored XSS in Jaeger UI allows attackers to execute arbitrary JavaScript via malicious trace attributes, potentially compromising user sessions.","url":"https://insights.sbomify.com/GHSA-2w8w-qhg4-f78j/"}