{"id":"CVE-2021-39183","aliases":["GHSA-2hfj-cxw7-g45p","GO-2022-0291"],"title":"Unsafe inline XSS in pasting DOM element into chat","summary":"Unsafe inline XSS in pasting DOM element into chat","severity":"high","cvss":8.2,"cvssVector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:H/A:L","vendor":"owncast","product":"github.com/owncast/owncast","ecosystem":"go","affected":["github.com/owncast/owncast < 0.0.9"],"patched":["github.com/owncast/owncast 0.0.9"],"published":"2021-12-14","updated":"2026-07-08","source":"OSV","sourceUrl":"https://osv.dev/vulnerability/GHSA-2hfj-cxw7-g45p","references":[{"url":"https://github.com/owncast/owncast/security/advisories/GHSA-2hfj-cxw7-g45p"},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-39183"},{"url":"https://github.com/owncast/owncast"}],"tags":["osv","go"],"epss":0.00747,"epssPercentile":0.53385,"ingestedAt":"2026-07-09T18:56:35.437Z","slug":"CVE-2021-39183","body":"## Overview\n\n### 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)\n\n\n## Affected packages\n\n- `github.com/owncast/owncast < 0.0.9`\n\n## Remediation\n\nUpgrade to a patched release:\n\n- `github.com/owncast/owncast 0.0.9`","depth":"twilight","depthScore":45,"depthScoreParts":{"impact":45.1,"likelihood":0.1,"exploitation":0,"ransomware":0},"changes":[]}