Skip to content

Modernized help UI prototype: Fix DOM-based XSS vulnerability#2677

Open
howlger wants to merge 1 commit into
eclipse-platform:masterfrom
howlger:patch-7
Open

Modernized help UI prototype: Fix DOM-based XSS vulnerability#2677
howlger wants to merge 1 commit into
eclipse-platform:masterfrom
howlger:patch-7

Conversation

@howlger
Copy link
Copy Markdown
Contributor

@howlger howlger commented May 29, 2026

When the modernized help UI is activated, this vulnerability can be reproduced by creating a search scope with the following name: scope1<video src=0 onloadstart=alert('XSS')>
This will cause an alert box to pop up, proving that the JavaScript code within the scope name will be executed.

Caused by:
The search scope configuration page is created dynamically via JavaScript: A button element is inserted into the DOM for each scope. However, the scope name is incorrectly set to the button as innerHTML rather than textContent or a child text node.

Type of vulnerability:
DOM-based or type-0 cross-site scripting (XSS)
See: https://owasp.org/www-community/attacks/DOM_Based_XSS

Attack vector:
The attacker tricks the user into entering a scope name, containing the malicious JavaScript code.

This vulnerability can be reproduced by creating a search scope with the following name:
  scope1<video src=0 onloadstart=alert('XSS')>
This will cause an alert box to pop up, proving that the JavaScript code within the scope name will be executed.

Caused by:
The search scope configuration page is created dynamically via JavaScript: A button element is inserted into the DOM for each scope. However, the scope name is incorrectly set to the button as `innerHTML` rather than `textContent` or a child text node.

Type of vulnerability:
DOM-based or type-0 cross-site scripting (XSS)
See: https://owasp.org/www-community/attacks/DOM_Based_XSS

Attack vector:
The attacker tricks the user into entering a scope name, containing the malicious JavaScript code.
@github-actions
Copy link
Copy Markdown
Contributor

Test Results

    54 files  ±0      54 suites  ±0   36m 10s ⏱️ +36s
 4 667 tests ±0   4 645 ✅ ±0   22 💤 ±0  0 ❌ ±0 
11 895 runs  ±0  11 742 ✅ ±0  153 💤 ±0  0 ❌ ±0 

Results for commit 543064d. ± Comparison against base commit 3b9b910.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant