{"id":"CVE-2022-1464","aliases":["ALPINE-CVE-2022-1464","EUVD-2022-3755","GHSA-ff28-f46g-r9g8","GO-2022-0597"],"status":"published","title":"Stored xss bug  in gogs/gogs","description":"Stored xss bug in GitHub repository gogs/gogs prior to 0.12.7. As the repo is public , any user can view the report and when open the attachment then xss is executed. This bug allow executed any javascript code in victim account .","severity":{"version":"3.0","score":7.3,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L","level":"high","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-08","score":0.00719,"percentile":0.54144,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-79"],"published":"2022-05-05T13:45:12Z","modified":"2026-11-03T07:31:05Z","fixes":[{"ecosystem":"Go","package":"gogs.io/gogs","fixed_in":["0.12.7"],"sources":["ghsa","osv"]},{"ecosystem":"Alpine:v3.16","package":"gogs","fixed_in":["0.12.7-r0"],"sources":["osv"]},{"ecosystem":"Alpine:v3.17","package":"gogs","fixed_in":["0.12.7-r0"],"sources":["osv"]},{"ecosystem":"Alpine:v3.18","package":"gogs","fixed_in":["0.12.7-r0"],"sources":["osv"]},{"ecosystem":"Alpine:v3.19","package":"gogs","fixed_in":["0.12.7-r0"],"sources":["osv"]},{"ecosystem":"Alpine:v3.20","package":"gogs","fixed_in":["0.12.7-r0"],"sources":["osv"]}],"affected":[{"source":"ghsa","ecosystem":"Go","package":"gogs.io/gogs","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.12.7"}]}]},{"source":"osv","ecosystem":"Alpine:v3.16","package":"gogs","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.12.7-r0"}]}]},{"source":"osv","ecosystem":"Alpine:v3.17","package":"gogs","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.12.7-r0"}]}]},{"source":"osv","ecosystem":"Alpine:v3.18","package":"gogs","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.12.7-r0"}]}]},{"source":"osv","ecosystem":"Alpine:v3.19","package":"gogs","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.12.7-r0"}]}]},{"source":"osv","ecosystem":"Alpine:v3.20","package":"gogs","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.12.7-r0"}]}]},{"source":"osv","ecosystem":"Go","package":"gogs.io/gogs","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.12.7"}]}]},{"source":"osv","ecosystem":"Go","package":"gogs.io/gogs","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.12.7"}]}]}],"products":[{"vendor":"gogs","product":"gogs"},{"vendor":"gogs","product":"gogs/gogs"}],"references":[{"url":"https://huntr.dev/bounties/34a12146-3a5d-4efc-a0f8-7a3ae04b198d","tags":["x_refsource_CONFIRM","x_transferred","Exploit","Third Party Advisory","web"]},{"url":"https://github.com/gogs/gogs/commit/bc77440b301ac8780698be91dff1ac33b7cee850","tags":["x_refsource_MISC","x_transferred","Patch","Third Party Advisory","fix","web"]},{"url":"https://github.com/gogs/gogs/security/advisories/GHSA-ff28-f46g-r9g8","tags":["web","advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-1464","tags":["advisory"]},{"url":"https://github.com/advisories/GHSA-ff28-f46g-r9g8"},{"url":"https://security.alpinelinux.org/vuln/CVE-2022-1464","tags":["advisory"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/1xxx/CVE-2022-1464.json","tags":["advisory"]},{"url":"https://github.com/gogs/gogs","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2022-1464","title":"Stored xss bug  in gogs/gogs","description":"Stored xss bug in GitHub repository gogs/gogs prior to 0.12.7. As the repo is public , any user can view the report and when open the attachment then xss is executed. This bug allow executed any javascript code in victim account .","status":"published","published":"2022-05-05T13:45:12Z","modified":"2024-08-03T00:03:06.27Z","cvss":[{"version":"3.0","score":7.3,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L","level":"high","assessor":"cna"}],"cwes":["CWE-79"],"updated_at":"2026-11-02T14:34:38.581997Z"}],"euvd":[{"id":"EUVD-2022-3755","description":"Stored xss bug in GitHub repository gogs/gogs prior to 0.12.7. As the repo is public , any user can view the report and when open the attachment then xss is executed. This bug allow executed any javascript code in victim account .","status":"published","published":"2022-05-05T13:45:12Z","modified":"2024-08-03T00:03:06Z","cvss":[{"version":"3.0","score":7.3,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L","level":"high"}],"updated_at":"2026-11-03T03:26:01.010049Z"}],"ghsa":[{"id":"GHSA-ff28-f46g-r9g8","title":"Cross-site Scripting in Gogs","description":"### 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","status":"published","published":"2022-05-24T20:48:14Z","modified":"2023-01-27T05:01:45Z","cvss":[{"version":"3.1","score":5.4,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N","level":"medium"}],"cwes":["CWE-79"],"updated_at":"2026-11-02T14:36:16.28305Z"}],"nvd":[{"id":"CVE-2022-1464","description":"Stored xss bug in GitHub repository gogs/gogs prior to 0.12.7. As the repo is public , any user can view the report and when open the attachment then xss is executed. This bug allow executed any javascript code in victim account .","status":"published","published":"2022-05-05T14:15:08.01Z","modified":"2026-06-17T04:22:29.983Z","cvss":[{"version":"3.1","score":5.4,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N","level":"medium","assessor":"primary"},{"version":"3.0","score":7.3,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L","level":"high","assessor":"secondary"},{"version":"2.0","score":3.5,"vector":"AV:N/AC:M/Au:S/C:N/I:P/A:N","level":"low","assessor":"primary"}],"cwes":["CWE-79"],"updated_at":"2026-11-02T14:07:18.660414Z"}],"osv":[{"id":"ALPINE-CVE-2022-1464","description":"Stored xss bug in GitHub repository gogs/gogs prior to 0.12.7. As the repo is public , any user can view the report and when open the attachment then xss is executed. This bug allow executed any javascript code in victim account .","status":"published","published":"2022-05-05T14:15:08.01Z","modified":"2026-11-03T07:31:05.564220954Z","cvss":[{"version":"3.1","score":5.4,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N","level":"medium"}],"updated_at":"2026-11-03T07:50:01.054176Z"},{"id":"CVE-2022-1464","title":"Stored xss bug  in gogs/gogs","description":"Stored xss bug in GitHub repository gogs/gogs prior to 0.12.7. As the repo is public , any user can view the report and when open the attachment then xss is executed. This bug allow executed any javascript code in victim account .","status":"published","published":"2022-05-05T13:45:12Z","modified":"2026-10-28T02:30:47.618614962Z","cvss":[{"version":"3.0","score":7.3,"vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L","level":"high"}],"cwes":["CWE-79"],"updated_at":"2026-11-02T15:44:23.245966Z"},{"id":"GHSA-ff28-f46g-r9g8","title":"Cross-site Scripting in Gogs","description":"### 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","status":"published","published":"2022-05-24T20:48:14Z","modified":"2024-08-21T15:42:03.121316Z","cvss":[{"version":"3.1","score":5.4,"vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N","level":"medium"}],"cwes":["CWE-79"],"updated_at":"2026-11-02T15:46:46.39441Z"},{"id":"GO-2022-0597","title":"Cross-site Scripting in Gogs in gogs.io/gogs","description":"Cross-site Scripting in Gogs in gogs.io/gogs","status":"published","published":"2024-08-21T15:11:38Z","modified":"2026-03-03T04:50:39.003382Z","updated_at":"2026-11-02T15:47:00.918515Z"}]}}
