{"id":"CVE-2026-118492","kind":"vulnerability","aliases":["CVE-2026-118492"],"related":[],"title":"Langium langium-sprotty: unescaped diagnostic messages allow script run on hover","description":"In Eclipse Langium versions 3.0.0 and later, the langium-sprotty package does not HTML-escape diagnostic messages before rendering them in the default hover popup provided by `addHoverPopupHandler`. If a Langium grammar allows cross-reference text to contain HTML markup (such as through a STRING terminal), an unresolved cross-reference produces a diagnostic message that includes the literal ref text. When a Sprotty diagram is opened for a malicious source file under these conditions, and a user hovers over the corresponding error marker, attacker-controlled JavaScript can execute in the browser or webview.","summary":"The langium-sprotty package inserts diagnostic messages into the hover popup without HTML escaping, so markup in cross-reference text is rendered. If a user opens a malicious source file in a Sprotty diagram and hovers over the error marker, attacker JavaScript can run in the browser or webview.","severity":"low","cvss":2.0,"epss":null,"exploited":false,"exploited_at":null,"products":[],"ecosystems":[],"tags":["eclipse-langium","langium","langium-sprotty","package","vscode-extensions"],"not_affected_if":["custom-hover-popup","no-langium-sprotty","trusted-source-files-only"],"how_to_check":"- Check whether the project depends on `langium-sprotty` from version `3.0.0` or later.\n- Check whether the Langium grammar allows STRING terminals to feed cross-reference text.\n- Check whether `addHoverPopupHandler` is used to show diagnostics.","fix":null,"status":"open","published_at":"2026-11-09T16:17:26+00:00","first_seen_at":"2026-11-09T16:27:26+00:00","triaged_at":"2026-11-09T16:28:33+00:00","updated_at":"2026-11-09T16:28:33+00:00","category":"package","confidence":0.6,"triage":{"at":"2026-11-09T16:28:33Z","model":"claude-haiku-5-5","output":{"fix":"unknown","reach":"local","title":"Langium langium-sprotty: unescaped diagnostic messages allow script run on hover","impact":"medium","summary":"The langium-sprotty package inserts diagnostic messages into the hover popup without HTML escaping, so markup in cross-reference text is rendered. If a user opens a malicious source file in a Sprotty diagram and hovers over the error marker, attacker JavaScript can run in the browser or webview.","audience":"developers","category":"package","nicknames":[],"who_cares":["langium","langium-sprotty","eclipse-langium","vscode-extensions"],"confidence":0.6,"fix_status":"unknown","needs_auth":"no","worst_case":"attacker JavaScript runs in the user's browser or webview","analyst_note":"Confirm the fixed version and any workaround from the Eclipse Langium GitHub advisory linked in the sources.","how_to_check":"- Check whether the project depends on `langium-sprotty` from version `3.0.0` or later.\n- Check whether the Langium grammar allows STRING terminals to feed cross-reference text.\n- Check whether `addHoverPopupHandler` is used to show diagnostics.","plain_action":"","product_name":"","needs_analyst":true,"not_affected_if":["no-langium-sprotty","custom-hover-popup","trusted-source-files-only"],"who_is_affected":"Teams that use langium-sprotty 3.0.0 or later with a grammar that lets cross-reference text contain HTML, and that render diagrams for untrusted source files. Projects that do not use langium-sprotty or the default hover popup are not affected. The sources do not give a fixed version.","user_interaction":"yes","product_ecosystem":"","needs_special_setup":"yes","severity_if_unknown":"low"},"cost_usd":0.000772,"input_tokens":4679,"output_tokens":608,"severity_before":"low"},"analyst_status":null,"analyst_note":null,"search":"'-118492':15A,18A '-2026':14A,17A '3.0.0':85C 'addhoverpopuphandl':110C 'allow':8A,115C 'attack':72B,169C 'attacker-control':168C 'browser':78B,176C 'condit':158C 'contain':121C 'control':170C 'correspond':165C 'cross':49B,117C,133C 'cross-refer':48B,116C,132C 'cve':13A,16A 'default':105C 'diagnost':6A,36B,98C,137C 'diagram':65B,148C 'eclips':20B,82C 'eclipse-langium':19B 'error':70B,166C 'escap':44B,97C 'execut':173C 'extens':29B 'file':61B,155C 'grammar':114C 'hover':12A,40B,67B,106C,162C 'html':43B,96C,122C 'html-escap':95C 'includ':140C 'insert':35B 'javascript':73B,171C 'langium':1A,3A,21B,22B,24B,32B,83C,90C,113C 'langium-sprotti':2A,23B,31B,89C 'later':87C 'liter':142C 'malici':59B,153C 'marker':71B,167C 'markup':46B,123C 'messag':7A,37B,99C,138C 'open':57B,150C 'packag':26B,34B,92C 'popup':41B,107C 'produc':135C 'provid':108C 'ref':143C 'refer':50B,118C,134C 'render':53B,101C 'run':10A,75B 'script':9A 'sourc':60B,154C 'sprotti':4A,25B,33B,64B,91C,147C 'string':128C 'termin':129C 'text':51B,119C,144C 'unescap':5A 'unresolv':131C 'user':56B,161C 'version':84C 'vscode':28B 'vscode-extens':27B 'webview':80B,178C 'without':42B","nicknames":[],"mitigations":[],"who_affected":"Teams that use langium-sprotty 3.0.0 or later with a grammar that lets cross-reference text contain HTML, and that render diagrams for untrusted source files. Projects that do not use langium-sprotty or the default hover popup are not affected. The sources do not give a fixed version.","tier":"C","verified":{},"analyst_revisit_at":null,"fix_status":"none","audience":"developers","plain_action":null,"pkeys":[],"ptokens":[],"labels":["eclipselangium","langium","langiumsprotty","low","package","vscodeextensions"],"campaign_type":null,"search_a":"'-118492':15A,18A '-2026':14A,17A 'allow':8A 'cve':13A,16A 'diagnost':6A 'hover':12A 'langium':1A,3A 'langium-sprotti':2A 'messag':7A 'run':10A 'script':9A 'sprotti':4A 'unescap':5A","search_b":"'attack':72B 'browser':78B 'cross':49B 'cross-refer':48B 'diagnost':36B 'diagram':65B 'eclips':20B 'eclipse-langium':19B 'error':70B 'escap':44B 'extens':29B 'file':61B 'hover':40B,67B 'html':43B 'insert':35B 'javascript':73B 'langium':21B,22B,24B,32B 'langium-sprotti':23B,31B 'malici':59B 'marker':71B 'markup':46B 'messag':37B 'open':57B 'packag':26B,34B 'popup':41B 'refer':50B 'render':53B 'run':75B 'sourc':60B 'sprotti':25B,33B,64B 'text':51B 'user':56B 'vscode':28B 'vscode-extens':27B 'webview':80B 'without':42B","search_c":"'3.0.0':85C 'addhoverpopuphandl':110C 'allow':115C 'attack':169C 'attacker-control':168C 'browser':176C 'condit':158C 'contain':121C 'control':170C 'correspond':165C 'cross':117C,133C 'cross-refer':116C,132C 'default':105C 'diagnost':98C,137C 'diagram':148C 'eclips':82C 'error':166C 'escap':97C 'execut':173C 'file':155C 'grammar':114C 'hover':106C,162C 'html':96C,122C 'html-escap':95C 'includ':140C 'javascript':171C 'langium':83C,90C,113C 'langium-sprotti':89C 'later':87C 'liter':142C 'malici':153C 'marker':167C 'markup':123C 'messag':99C,138C 'open':150C 'packag':92C 'popup':107C 'produc':135C 'provid':108C 'ref':143C 'refer':118C,134C 'render':101C 'sourc':154C 'sprotti':91C,147C 'string':128C 'termin':129C 'text':119C,144C 'unresolv':131C 'user':161C 'version':84C 'webview':178C","cause_entry":null,"cause_path":null,"disclosures_checked_at":null,"first_public_at":"2026-11-09T16:17:26+00:00","kev":null,"cvss_vector":"CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:N/R:A/V:D/RE:X/U:X","cvss_by":"emo@eclipse.org","poc_count":0,"sources":[{"source":"nvd","external_id":"CVE-2026-118492","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-118492","severity":null,"published_at":"2026-11-09T16:17:26+00:00","modified_at":"2026-11-09T16:17:26+00:00","first_seen_at":"2026-11-09T16:27:26+00:00","fetched_at":"2026-11-09T16:27:26+00:00","note":null}],"documents":[{"id":108242,"url":"https://github.com/eclipse-langium/langium/security/advisories/GHSA-7c4f-7qwx-hmcv","title":"Vendor advisory: github.com","kind":"vendor","source":"nvd","publisher":"vendor","text":null,"published_at":null,"relation":"advisory","confidence":null,"note":"Vendor advisory: github.com"}],"disclosures":[],"exploit_sources":[],"notice":"Free to read, with fair use of about 60 pages a minute. For higher limits or API access: sales@infrastack.ai"}