{"id":"CVE-2022-1464","aliases":["CVE-2022-1464","GHSA-ff28-f46g-r9g8","GO-2022-0597"],"related":[],"kind":"vulnerability","state":"published","title":"Stored xss bug  in gogs/gogs","summary":"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 .","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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 .","source":"cvelist"},{"lang":"en","text":"### 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.","format":"markdown","source":"ghsa"},{"lang":"en","text":"Cross-site Scripting in Gogs in gogs.io/gogs","format":"markdown","source":"go"},{"lang":"es","text":"Un bug de tipo xss almacenado en el repositorio de GitHub gogs/gogs versiones anteriores a 0.12.7. Como el repositorio es público, cualquier usuario puede visualizar el informe y cuando abre el archivo adjunto es ejecutado el ataque de tipo xss. Este error permite ejecutar cualquier código javascript en la cuenta de la víctima","source":"nvd"}],"published":"2022-05-05T13:45:12.000Z","modified":"2026-06-17T04:22:29.983Z","severity":{"scorer":"@huntrdev","scheme":"CVSS:3.0","vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L","score":7.3,"rating":"HIGH"},"severities":[{"scorer":"@huntrdev","scheme":"CVSS:3.0","vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L","score":7.3,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N","score":5.4,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N","score":5.4,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:N/AC:M/Au:S/C:N/I:P/A:N","score":3.5,"rating":"LOW"}],"cwes":["CWE-79"],"affected":[{"ranges":[{"type":"custom","introduced":"unspecified","fixed":"0.12.7","status":"affected"}],"vendor":"gogs","product":"gogs/gogs","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.12.7"}],"ecosystem":"Go","package":"gogs.io/gogs","purl":"pkg:golang/gogs.io/gogs","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.12.7"}],"ecosystem":"Go","package":"gogs.io/gogs","purl":"pkg:golang/gogs.io/gogs","source":"go"},{"ranges":[{"status":"affected","fixed":"0.12.7"}],"vendor":"gogs","product":"gogs","cpe":"cpe:2.3:a:gogs:gogs:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://huntr.dev/bounties/34a12146-3a5d-4efc-a0f8-7a3ae04b198d","tags":["exploit","third-party-advisory","web","x-refsource-confirm","x-transferred"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/gogs/gogs/commit/bc77440b301ac8780698be91dff1ac33b7cee850","tags":["patch","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/gogs/gogs/security/advisories/GHSA-ff28-f46g-r9g8","tags":["advisory","web"],"sources":["ghsa","go"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-1464","tags":["advisory"],"sources":["ghsa","go"]},{"url":"https://github.com/gogs/gogs","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"@huntrdev","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2022-1464","url":"https://www.cve.org/CVERecord?id=CVE-2022-1464","licence":"CVE Terms of Use","modified":"2024-08-03T00:03:06.270Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-ff28-f46g-r9g8","url":"https://github.com/advisories/GHSA-ff28-f46g-r9g8","licence":"CC-BY-4.0","modified":"2024-08-21T15:42:03.121Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2022-0597","url":"https://pkg.go.dev/vuln/GO-2022-0597","licence":"CC-BY-4.0","modified":"2026-03-03T04:50:39.003Z"},{"source":"nvd","name":"NVD","id":"CVE-2022-1464","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-1464","licence":"Public domain","modified":"2026-06-17T04:22:29.983Z"}],"updatedAt":"2026-11-25T22:58:11.425Z","epss":{"score":0.00719,"percentile":0.55139,"date":"2026-12-02T12:00:21.000Z"}}