Research/element-ics-javascript
0-dayNo CVEMediumPublic

Element Web, Univention ICS javascript: menu href

Element Web v1.12.29 Univention banner fetches ICS navigation.json, accepts link as z.string(), and Menu.tsx puts it on <a href>. URL preview already rejects javascript:. Not default app.element.io. Click XSS is Matrix ATO. No CVE yet.

Name
Element Web, Univention ICS javascript: menu href
Type
0-day analysis
CVE
n/a
CVE Risk
medium
Disclosure Status
public
Vendor
Element
Affected
Element Web v1.12.29 (2d90d6b) with modules/banner menu.type univention and a trusted ICS. Gadget lab of navigation parse plus Menu href render.
Published
12 Oct 2026
Updated
12 Oct 2026
Tags
0-day, element-web, xss, univention, cwe-79, cwe-20, authenticated

URL preview learned http/https. ICS link is still a string

I am @abraxas_null. The proof of concept is on GitHub: abraxas/element-ics-javascript (loopback client). The lab stack is lab/: Dockerfile, docker-compose.yml, run.sh, poc.py, gadget.py. Authorized lab only. It talks to loopback.

This is Element Web v1.12.29 (2d90d6b7b601ecb9ccdf81239a43b4396b4b0c9e). No CVE yet. CWE-79 / CWE-20. 6.8 Medium (CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:U/C:H/I:H/A:N). Remote XSS, gated. Not default app.element.io. Not OS RCE.

The Univention banner module fetches ICS navigation.json, accepts each entry's link as z.string() with no scheme check, and Menu.tsx puts that string on a styled <a href>. Static menu config uses z.url() for link_url. The ICS path does not. URL preview on the same pin already rejects javascript: (previewFromBundle, GHSA-9r5h).

Same pin: fragment guest wipe, vector: Windows drive-letter.

Why a gated Medium

I only wanted Critical or High. This is Medium because it needs modules/banner with menu.type: "univention" and an ICS the deploy trusts. Default app.element.io is not the victim. I am publishing it anyway because the sink is Element-origin script after a click, which is Matrix account takeover, and because URL preview already lost this fight on the same tag.

PR:H is the ICS operator or whoever can change navigation.json. UI:R is the signed-in user who opens the banner menu and clicks the item.

Pinning v1.12.29

Same tag. GHSA-9r5h taught previewFromBundle to require http:/https:. That helper is in apps/web. The Univention module is in modules/banner. Incomplete sibling across the monorepo.

The skip list

Same GHSA list as the guest post. HTML export XSS is closed. Homepage HTML is sanitized. Widget media token is origin-checked. Timeline XSS did not fire. Do not treat z.url() as a scheme allowlist: the URL constructor accepts javascript:.

Surfaces that returned nothing

Default Element.io banner is not Univention. Static operator link_url: z.url() is config, not ICS. URL-preview javascript: is rejected. Those are closed. I wanted the fetch path that never goes through either check.

ICS entries[].link was that path.

The silent-login iframe is the same class of leftover. SilentLogin.tsx sets src to new URL("silent", icsUrl) with no sandbox attribute, so a hostile ICS page can top-navigate. Lab-proven: no sandbox. Top-navigation not exercised.

The sink

modules/banner/src/Univention/navigation.ts 38-65: ICS link is z.string() with no scheme. navigationToConfig copies it:

Plain text
link_url: entry.link,

Menu.tsx around 168:

Plain text
<LinkButton key={link.link_url} href={link.link_url} target={link.target ?? "_blank"}>

SilentLogin.tsx 20-37: hidden iframe, no sandbox.

Plain text
return <HiddenIFrame src={url.href} />;

Static config in config.ts uses link_url: z.url() for operator-supplied menus. The Univention fetch path never goes through that check.

The lab

Gadget of the pin functions plus a mock ICS navigation.json. Not a live Element SPA. how=gadget. Loopback :19620. Compose project element-ics-javascript.

Mock ICS served navigation.json with link javascript:ELEMENT-ICS-JAVASCRIPT-WITNESS. The menu HTML had <a href="javascript:ELEMENT-ICS-JAVASCRIPT-WITNESS">. The https portal link still rendered. Applying the URL-preview http/https allowlist (previewFromBundle) dropped the javascript href and kept the https one. Silent iframe had no sandbox.

Plain text
SUCCESS element-ics-javascript how=gadget href-scheme=javascript menu-a-javascript=yes allowlist-rejects=yes silent-no-sandbox=yes ELEMENT-ICS-JAVASCRIPT-WITNESS
Plain text
python3 element-ics-javascript-Abraxas-Labs.py

or cd lab && ./run.sh. Target only http://127.0.0.1:19620. Stack tears down after the run.

Wrong turns, in the order I made them

Treating default app.element.io as the victim. Univention is gated. menu.type has to be univention. That is why it is Medium.

Treating z.url() as a scheme allowlist. The URL constructor accepts javascript:. Static config is still not an http/https allowlist. It is also not the ICS path.

Inflating click XSS to OS RCE. Desktop still has nodeIntegration: false, sandbox, contextIsolation. Element-origin script is Matrix ATO.

Driving a browser click in the lab. The href string is the leftover. how=gadget. I did not steal a live Matrix token.

A reverse shell. Theatre. The oracle is the javascript: href plus the allowlist dropping it.

What an attacker can do

Compromise or operate the ICS that the Element deploy trusts. Put a javascript: (or data:) URL in navigation.json. Wait for a signed-in user to open the banner menu and click the item.

Class: XSS. Reach: Remote.

Privilege Method / sink Recon / integrity / availability Lab-proven or inferred
Render a banner-menu <a href="javascript:…"> on the Element origin ICS navigation.json entries[].link -> navigationToConfig link_url -> Menu.tsx href={link.link_url} Integrity of the menu DOM Lab-proven. Mock ICS link javascript:ELEMENT-ICS-JAVASCRIPT-WITNESS became that href. https portal link still rendered
Run script as the Element origin after a click Victim clicks the menu item (UI:R) Integrity Inferred from the href sink. Lab did not drive a browser click or steal a live Matrix token
Read the Matrix access token / crypto store (account takeover) In-origin script vs localStorage / IndexedDB session Recon / integrity Inferred from Element origin XSS. Lab witness is the href string
Top-navigate the Element tab to a phishing page SilentLogin.tsx unsandboxed iframe src={new URL("silent", icsUrl)} Integrity Lab-proven the iframe has no sandbox. Top-navigation not exercised
Same plant via data: z.string() accepts any scheme Integrity Inferred. Lab planted javascript: only

Closed: default app.element.io; OS RCE / LPE; timeline HTML XSS; URL-preview javascript:; HTML export XSS; widget media token.

The fix

Allowlist http: and https: on ICS link the same way previewFromBundle does. Reject javascript:, data:, and other schemes before href=. Sandbox the silent iframe (sandbox="" or at least no allow-top-navigation). Do not treat z.url() as a scheme allowlist.

I am not going to print a navigation.json you can plant on someone else's ICS. The missing scheme check is the useful part. If you own the deploy, run the proof of concept against loopback.

References