GHSA-4MX2-RQX5-2PP6
Forged tag: class token via a space in a start attribute gives stored XSS in appendSpan
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:L
Fuente: GitHub
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Divulgación | Publicada | GHSA-4MX2-RQX5-2PP6 divulgada · CVSS 8.9 (GitHub) | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
linestylefilter.ts builds the per-span class string by appending attribute-pool values into a space-delimited list:
} else if (key === 'list') {
classes += ` list:${value}`;
} else if (key === 'start') {
classes += ` start:${value}`;
A value containing a space therefore contributes a second class token, and domline.appendSpan reads one of those tokens back as a tag name and emits it raw:
cls = cls.replace(/(^| )tag:(\S+)/g, (x0, space, tag) => {
simpleTags.push(tag.toLowerCase());
...
extraOpenTags = `${extraOpenTags}<${simpleTags.join('><')}>`;
toLowerCase is the only transform. A start value of `1 tag:img/src="x"/onerror=...`, with no list attribute so the lineAttribMarker branch is skipped, renders as a live element with a live handler.
I ran this against the v3.3.6 release tarball under jsdom, through linestylefilter.populateDomLine and the element.innerHTML assignment in broadcast.ts:69-76, which is the timeslider renderer. It produced <img src="x" onerror="document.title='pwned-onerror'"> and the handler ran when the load error fired. As controls in the same run, the same payload typed as pad text came out escaped, and the space-free payload from GHSA-f7h5-v9hm-548j was correctly rejected, so this is a different token in the same function rather than that bug resurfacing. There is no Content-Security-Policy in src/node or src/templates.
For the route to the attribute pool I am relying on your own GHSA-2jp7-wwpg-3p9w, which states that only author attributes are validated in a submitted changeset and that moveOpsToNewPool and AttributePool.putAttrib store any value. start is also not in AttributeManager.lineAttributes, which is what lets it skip the list branch. I did not drive a live socket, only the renderer, so the pool-write half is source reading plus your own advisory text rather than something I executed.
Confirmed at tag v3.3.6 and at develop, where domline.ts, linestylefilter.ts and ImportEtherpad.ts are byte-identical to the release. Both sinks are also present in ep_etherpad-lite 1.8.14, the only version published to npm, so this predates the TypeScript port.
One request about the package name, offered because it affects whether this reaches anyone. GHSA-f7h5-v9hm-548j was filed against npm package etherpad-lite, which does not exist on the registry, so it is absent from an affects query for ep_etherpad-lite and never reached Dependabot. Please range this one against ep_etherpad-lite.
For a direction rather than a patch, I would validate the value where the class string is assembled rather than at each reader, since every consumer of that string splits it on spaces.
I used AI assistance while investigating, but I read the code path and built and ran the renderer harness myself, with the controls above in the same session.
Desglose de métricas
Rangos afectados
Estado del parche por paquete
| Paquete / producto | Estado | Corregida en | Desde divulgación | Última versión |
|---|---|---|---|---|
npmep_etherpad-lite |
Sin parche | — | — | 1.8.14 afectada |
Arsenal público
Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.
https://github.com/ether/etherpad/security/advisories/GHSA-4mx2-rqx5-2pp6Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
