{"id":"CVE-2022-1464","aliases":["GHSA-ff28-f46g-r9g8","GO-2022-0597"],"url":"https://o3.security/vulnerability/CVE-2022-1464","summary":"Stored xss bug  in gogs/gogs","details":"### Impact\n\nThe malicious user is able to upload a crafted SVG file as the issue attachment to archive XSS. All installations [allow uploading SVG (`text/xml`) files as issue attachments (non-default)](https://github.com/gogs/gogs/blob/e51e01683408e10b3dcd2ace65e259ca7f0fd61b/conf/app.ini#L283-L284) are affected.\n\n### Patches\n\nCorrectly setting the Content Security Policy for the serving endpoint. Users should upgrade to 0.12.7 or the latest 0.13.0+dev.\n\n### Workarounds\n\n[Disable uploading SVG files (`text/xml`) as issue attachments](https://github.com/gogs/gogs/blob/e51e01683408e10b3dcd2ace65e259ca7f0fd61b/conf/app.ini#L283-L284).\n\n### References\n\nhttps://huntr.dev/bounties/34a12146-3a5d-4efc-a0f8-7a3ae04b198d/\n\n### For more information\n\nIf you have any questions or comments about this advisory, please post on https://github.com/gogs/gogs/issues/6919.\n","published":"2022-05-05T13:45:12Z","modified":"2026-10-28T02:30:47.618614962Z","cvss":{"score":7.3,"severity":"HIGH","vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L"},"epss":null,"cisaKev":null,"exploitsKnown":1,"affectedPackages":[{"ecosystem":"Go","name":"gogs.io/gogs","fixedVersion":"0.12.7"}],"fix":{"url":"https://github.com/gogs/gogs/commit/bc77440b301ac8780698be91dff1ac33b7cee850","label":"gogs/gogs@bc77440"},"references":[{"type":"WEB","url":"https://huntr.dev/bounties/34a12146-3a5d-4efc-a0f8-7a3ae04b198d"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/1xxx/CVE-2022-1464.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-1464"},{"type":"FIX","url":"https://github.com/gogs/gogs/commit/bc77440b301ac8780698be91dff1ac33b7cee850"},{"type":"WEB","url":"https://github.com/gogs/gogs/security/advisories/GHSA-ff28-f46g-r9g8"},{"type":"PACKAGE","url":"https://github.com/gogs/gogs"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-10-28T02:30:47.618614962Z"}}