{"id":"CVE-2021-39183","aliases":["EUVD-2021-2423","GHSA-2hfj-cxw7-g45p","GO-2022-0291"],"status":"published","title":"Unsafe inline XSS Owncast","description":"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.","severity":{"version":"3.1","score":8.2,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:H/A:L","level":"high","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-10","score":0.00772,"percentile":0.56005,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-79"],"published":"2021-12-14T20:05:12Z","modified":"2026-11-10T02:45:19Z","fixes":[{"ecosystem":"Go","package":"github.com/owncast/owncast","fixed_in":["0.0.9"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"Go","package":"github.com/owncast/owncast","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.0.9"}]}]},{"source":"osv","ecosystem":"Go","package":"github.com/owncast/owncast","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.0.9"}]}]},{"source":"osv","ecosystem":"Go","package":"github.com/owncast/owncast","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.0.9"}]}]}],"products":[{"vendor":"owncast","product":"owncast"},{"vendor":"owncast_project","product":"owncast"}],"references":[{"url":"https://github.com/owncast/owncast/security/advisories/GHSA-2hfj-cxw7-g45p","tags":["x_refsource_CONFIRM","x_transferred","Exploit","Patch","Third Party Advisory","fix","web","advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-39183","tags":["advisory"]},{"url":"https://github.com/advisories/GHSA-2hfj-cxw7-g45p"},{"url":"https://github.com/owncast/owncast","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2021-39183","title":"Unsafe inline XSS Owncast","description":"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.","status":"published","published":"2021-12-14T20:05:12Z","modified":"2024-08-04T01:58:18.143Z","cvss":[{"version":"3.1","score":8.2,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:H/A:L","level":"high","assessor":"cna"}],"cwes":["CWE-79"],"updated_at":"2026-11-02T14:33:09.540052Z"}],"euvd":[{"id":"EUVD-2021-2423","description":"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.","status":"published","published":"2021-12-14T20:05:12Z","modified":"2024-08-04T01:58:18Z","cvss":[{"version":"3.1","score":8.2,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:H/A:L","level":"high"}],"updated_at":"2026-11-03T03:24:24.305495Z"}],"ghsa":[{"id":"GHSA-2hfj-cxw7-g45p","title":"Unsafe inline XSS in pasting DOM element into chat","description":"### 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 `\u003cimg src=null onerror=alert('hello')\u003e` 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)\n","status":"published","published":"2021-12-14T21:48:16Z","modified":"2023-02-01T05:06:46Z","cvss":[{"version":"3.1","score":8.2,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:H/A:L","level":"high"}],"cwes":["CWE-79"],"updated_at":"2026-11-02T14:36:39.76883Z"}],"nvd":[{"id":"CVE-2021-39183","description":"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.","status":"published","published":"2021-12-14T20:15:07.49Z","modified":"2026-06-17T04:03:16.027Z","cvss":[{"version":"3.1","score":8.2,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:H/A:L","level":"high","assessor":"secondary"},{"version":"3.1","score":6.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","level":"medium","assessor":"primary"},{"version":"2.0","score":4.3,"vector":"AV:N/AC:M/Au:N/C:N/I:P/A:N","level":"medium","assessor":"primary"}],"cwes":["CWE-79"],"updated_at":"2026-11-02T14:07:02.189991Z"}],"osv":[{"id":"CVE-2021-39183","description":"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.","status":"published","published":"2021-12-14T20:15:07.49Z","modified":"2026-11-10T02:45:19.024155978Z","cvss":[{"version":"3.1","score":6.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","level":"medium"}],"updated_at":"2026-11-10T03:16:41.950556Z"},{"id":"GHSA-2hfj-cxw7-g45p","title":"Unsafe inline XSS in pasting DOM element into chat","description":"### 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 `\u003cimg src=null onerror=alert('hello')\u003e` 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)\n","status":"published","published":"2021-12-14T21:48:16Z","modified":"2026-07-08T06:27:31.74794811Z","cvss":[{"version":"3.1","score":8.2,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:H/A:L","level":"high"}],"cwes":["CWE-79"],"updated_at":"2026-11-02T15:46:34.338541Z"},{"id":"GO-2022-0291","title":"Unsafe inline XSS in pasting DOM element into chat in github.com/owncast/owncast","description":"Unsafe inline XSS in pasting DOM element into chat in github.com/owncast/owncast","status":"published","published":"2024-08-21T14:30:26Z","modified":"2026-03-03T04:52:06.84267Z","updated_at":"2026-11-02T15:47:00.604718Z"}]}}
