Advisory

GHSA-2hfj-cxw7-g45p

Also known as: CVE-2021-39183, GO-2022-0291

Summary

Unsafe inline XSS in pasting DOM element into chat

Details

Impact

Inline scripts are executed when Javascript is parsed via a paste action.

  1. Open https://watch.owncast.online/
  2. Copy and then paste <img src=null onerror=alert('hello')> into the

chat field.

  1. An alert should pop up.

Patches

    ⋮ 13 │    // Content security policy
    ⋮ 14 │    csp := []string{
    ⋮ 15 │        "script-src 'self' 'sha256-2HPCfJIJHnY0NrRDPTOdC7AOSJIcQyNxzUuut3TsYRY='",
    ⋮ 16 │        "worker-src 'self' blob:", // No single quotes around blob:
    ⋮ 17 │    }

Will be patched in 0.0.9 by blocking unsafe-inline Content Security Policy and specifying the script-src. The worker-src is required to be set to blob for the video player.

For more information

If you have any questions or comments about this advisory:

Severity

High Basis: The source's own band: HIGH

Dates

Published
2021-12-14 21:48 UTC
Modified
2026-07-08 06:27 UTC

Affected packages and fixes

github.com/owncast/owncast

Go · All systems

Affected

  • introduced 0, fixed 0.0.9 (semver)

Fixed versions

0.0.9

Fix

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences