{"id":"CVE-2021-39183","aliases":["GHSA-2hfj-cxw7-g45p","GO-2022-0291"],"url":"https://o3.security/vulnerability/CVE-2021-39183","summary":"Unsafe inline XSS in pasting DOM element into chat","details":"### 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","published":"2021-12-14T20:15:07.490Z","modified":"2026-07-09T12:20:12.171574Z","cvss":{"score":6.1,"severity":"MEDIUM","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N"},"epss":{"score":0.00747,"percentile":0.53199,"asOf":"2026-09-17"},"cisaKev":null,"exploitsKnown":1,"affectedPackages":[{"ecosystem":"Go","name":"github.com/owncast/owncast","fixedVersion":"0.0.9"}],"fix":null,"references":[{"type":"FIX","url":"https://github.com/owncast/owncast/security/advisories/GHSA-2hfj-cxw7-g45p"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-39183"},{"type":"PACKAGE","url":"https://github.com/owncast/owncast"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-07-09T12:20:12.171574Z"}}