CVE-2026-118492
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 po…
Impact
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.
An attacker can exploit this with local access to the system, without logging in, but a user has to be involved, for example by viewing content. Specific conditions have to be met, which makes an attack harder.
Affected products · Eclipse Foundation
| Product | Affected versions |
|---|---|
| Eclipse Langium | from 3.0.0 through 4.4.0 Version 3.0.0 ≤4.4.0 |
Weakness classification
References
- NVD record
- CVE.org record
- GitHub advisory
- https://gitlab.eclipse.org/security/vulnerability-reports/-/work_items/1018
- https://github.com/eclipse-langium/langium/security/advisories/GHSA-7c4f-7qwx-hmcv
- https://gitlab.eclipse.org/security/cve-assignment/-/work_items/512
- https://github.com/advisories/GHSA-cw7r-mhgg-m7v3
- https://nvd.nist.gov/vuln/detail/CVE-2026-118492