GHSA-9FX8-47W4-3VW8
Stored XSS in the console via unsanitized Markdown (iframe srcdoc) in Organization Context; no CSP on the console app
Texto original en inglés · Ver en español
CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:L/I:L/A:N
Fuente: GitHub
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Divulgación | Publicada | GHSA-9FX8-47W4-3VW8 divulgada · CVSS 4.8 (GitHub) | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
Stored XSS in the console via unsanitized Markdown (`<iframe srcdoc>`) in Organization Context; no CSP on the console app
> AI-assistance disclosure: Found and drafted with the assistance of a generative-AI tool
> (Anthropic Claude / "Claude Code"); code references and the payload/sink behavior were reviewed and
> tested by the human reporter against the real, unmodified Probo code before submission.
- Component: `packages/ui/src/Atoms/Markdown/Markdown.tsx` (the shared Markdown renderer);
- Version: probod v0.222.2 (`a3b65a644`), default configuration.
- Class: CWE-79 (Stored Cross-Site Scripting); CWE-693 (missing CSP) as a contributing factor.
- Severity (proposed): Moderate — CVSS 3.1 `AV:N/AC:L/PR:H/UI:R/S:C/C:L/I:L/A:N` = 4.8
- Confidence: High on the sink and the absent-CSP gate.
Summary
The shared `Markdown` component renders Markdown with `react-markdown` + `rehype-raw` and no
`rehype-sanitize`, so raw HTML in the content is emitted to the DOM. The Organization Context
field is authored by an OWNER/ADMIN via `updateOrganizationContext` (stored verbatim, no
sanitization) and rendered through this component on a page whose read permission
(`ActionOrganizationContextGet`) extends to VIEWER and AUDITOR. `react-markdown` v10 strips
`on*` handlers and neutralizes `javascript:`/`data:` URLs, but passes an `<iframe srcdoc="…">`
through intact; scripts inside `srcdoc` execute same-origin at the console origin. Because the
console SPA is served without any Content-Security-Policy (verified below), the injected script
executes — a stored XSS that runs in the session of any member (including OWNER and external
AUDITOR) who views the org Context page.
Root cause (source)
Unsafe sink (`packages/ui/src/Atoms/Markdown/Markdown.tsx:29-31`):
<ReactMarkdown
remarkPlugins={[remarkGfm]}
rehypePlugins={[rehypeRaw]} // raw HTML passed through; NO rehype-sanitize
>`<iframe srcdoc="<script>…</script>">` survives this config (empirically: rendering the payload
through the exact plugin set preserves the `<iframe>` and its `srcDoc` attribute).
Write path: `updateOrganizationContext` (`organization_resolvers.go`) authorizes
`ActionOrganizationContextUpdate` (`core:*` → OWNER/ADMIN) and stores the value verbatim.
Read path: `ContextPage.tsx` renders `<Markdown content={...}/>`; `ActionOrganizationContextGet`
is granted to VIEWER and AUDITOR (`pkg/probo/policies.go:109,134`).
No CSP on the console app (decisive): the CSP `Content-Security-Policy: default-src 'self'` is
set only inside the API server's handler (`pkg/server/api/api.go`, mounted at `/api`). The console
SPA is mounted at `/` (`pkg/server/server.go:80`) and served by `pkg/server/web/web.go` →
`statichandler`, which sets only `Content-Type`, `Cache-Control`, and `ETag`
(`statichandler.go:145-216`) — no `Content-Security-Policy`, no `X-Frame-Options`. The console
`index.html` contains no `<meta http-equiv="Content-Security-Policy">`. So the document that
renders the Markdown has no CSP, and the inline script in the `<iframe srcdoc>` (which inherits the
embedding document's CSP — here, none) executes.
Reachability (hop-by-hop)
- Attacker holds OWNER/ADMIN and sets the Organization Context to
- A victim member (VIEWER / AUDITOR / another ADMIN / OWNER) opens the Organization Context
- No CSP on the console document → the inline script executes same-origin at the console origin
Impact
Stored XSS executing in a victim's authenticated console session. An ADMIN can thereby run script in
the session of an OWNER (theft of the owner's session/CSRF token → act as OWNER — a privilege
escalation independent of the `createUser` bug) or of an AUDITOR (typically an external party
granted limited access; their session may span multiple audited organizations). The absent CSP and
`X-Frame-Options` on the console are a contributing hardening gap (also enabling clickjacking).
Adversarial re-read
- *"React escapes output."* True for normal JSX, but this sink deliberately opts out via `rehype-raw`
- *"A CSP blocks the inline script."* Checked and refuted: the `default-src 'self'` CSP is on the
- *"`react-markdown` strips dangerous HTML."* It strips `on*`/`javascript:` but not `<iframe
- Residual (reflected in PR:H): the injector must be OWNER/ADMIN. The value is that it crosses to
Preconditions
- Attacker holds OWNER/ADMIN (to write the context). A victim with read access (VIEWER/AUDITOR/
Remediation
- Add `rehype-sanitize` after `rehype-raw` in `Markdown.tsx` (or remove `rehype-raw`) — this also
- Serve a restrictive `Content-Security-Policy` (and `X-Frame-Options: DENY`) on the console SPA
Desglose de métricas
Rangos afectados
Estado del parche por paquete
| Paquete / producto | Estado | Corregida en | Desde divulgación | Última versión |
|---|---|---|---|---|
gogo.probo.inc/probo |
Sin parche | — | — | v0.216.1 afectada |
0.257.0Arsenal público
Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.
https://github.com/getprobo/probo/security/advisories/GHSA-9fx8-47w4-3vw8Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
