{"id":"CVE-2021-39183","aliases":["CVE-2021-39183","GHSA-2hfj-cxw7-g45p","GO-2022-0291"],"related":[],"kind":"vulnerability","state":"published","title":"Unsafe inline XSS Owncast","summary":"Owncast is an open source, self-hosted live video streaming and chat server. In affected versions inline scripts are executed when Javascript is parsed via a paste action. This issue is 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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Owncast is an open source, self-hosted live video streaming and chat server. In affected versions inline scripts are executed when Javascript is parsed via a paste action. This issue is 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.","source":"cvelist"},{"lang":"en","text":"### Impact\n\nInline scripts are executed when Javascript is parsed via a paste action.\n\n1. Open https://watch.owncast.online/\n2. Copy and then paste `<img src=null onerror=alert('hello')>` into the\nchat field.\n3. An alert should pop up.\n\n### Patches\n```\n    ⋮ 13 │    // Content security policy\n    ⋮ 14 │    csp := []string{\n    ⋮ 15 │        \"script-src 'self' 'sha256-2HPCfJIJHnY0NrRDPTOdC7AOSJIcQyNxzUuut3TsYRY='\",\n    ⋮ 16 │        \"worker-src 'self' blob:\", // No single quotes around blob:\n    ⋮ 17 │    }\n```\n\nWill 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.\n\n### For more information\n\nIf you have any questions or comments about this advisory:\n* Open an issue in [owncast/owncast](https://github.com/owncast/owncast/issues)\n* Email us at [gabek@real-ity.com](mailto:gabek@real-ity.com)","format":"markdown","source":"ghsa"},{"lang":"en","text":"Unsafe inline XSS in pasting DOM element into chat in github.com/owncast/owncast","format":"markdown","source":"go"},{"lang":"es","text":"Owncast es un servidor de chat y transmisión de vídeo en directo de código abierto y autoalojado. En las versiones afectadas son ejecutados scripts en línea cuando es analizado Javascript mediante una acción de pegado. Este problema está parcheado en la versión 0.0.9 al bloquear la política de seguridad de contenidos unsafe-inline y la especificación del script-src. Es requerido que el worker-src sea establecido como blob para el reproductor de vídeo","source":"nvd"}],"published":"2021-12-14T20:05:12.000Z","modified":"2026-07-08T06:27:31.747Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:H/A:L","score":8.2,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:H/A:L","score":8.2,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:H/A:L","score":8.2,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","score":6.1,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:N/AC:M/Au:N/C:N/I:P/A:N","score":4.3,"rating":"MEDIUM"}],"cwes":["CWE-79"],"affected":[{"ranges":[{"version":"< 0.0.9","status":"affected"}],"vendor":"owncast","product":"owncast","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.0.9"}],"ecosystem":"Go","package":"github.com/owncast/owncast","purl":"pkg:golang/github.com/owncast/owncast","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.0.9"}],"ecosystem":"Go","package":"github.com/owncast/owncast","purl":"pkg:golang/github.com/owncast/owncast","source":"go"},{"ranges":[{"status":"affected","fixed":"0.0.9"}],"vendor":"owncast_project","product":"owncast","cpe":"cpe:2.3:a:owncast_project:owncast:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/owncast/owncast/security/advisories/GHSA-2hfj-cxw7-g45p","tags":["advisory","exploit","patch","third-party-advisory","web","x-refsource-confirm","x-transferred"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-39183","tags":["advisory"],"sources":["ghsa","go"]},{"url":"https://github.com/owncast/owncast","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2021-39183","url":"https://www.cve.org/CVERecord?id=CVE-2021-39183","licence":"CVE Terms of Use","modified":"2024-08-04T01:58:18.143Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-2hfj-cxw7-g45p","url":"https://github.com/advisories/GHSA-2hfj-cxw7-g45p","licence":"CC-BY-4.0","modified":"2026-07-08T06:27:31.747Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2022-0291","url":"https://pkg.go.dev/vuln/GO-2022-0291","licence":"CC-BY-4.0","modified":"2026-03-03T04:52:06.842Z"},{"source":"nvd","name":"NVD","id":"CVE-2021-39183","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-39183","licence":"Public domain","modified":"2026-06-17T04:03:16.027Z"}],"updatedAt":"2026-11-25T22:58:05.982Z","epss":{"score":0.00772,"percentile":0.56896,"date":"2026-12-01T12:00:22.000Z"}}