{"id":"CVE-2022-31038","aliases":["EUVD-2022-6192","GHSA-xq4v-vrp9-vcf2","GO-2022-0483"],"status":"published","title":"XSS vulnerability in repository issue list in Gogs","description":"Gogs is an open source self-hosted Git service. In versions of gogs prior to 0.12.9 `DisplayName` does not filter characters input from users, which leads to an XSS vulnerability when directly displayed in the issue list. This issue has been resolved in commit 155cae1d which sanitizes `DisplayName` prior to display to the user. All users of gogs are advised to upgrade. Users unable to upgrade should check their users' display names for malicious characters.","severity":{"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":"cna","from":"cve"},"epss":{"day":"2026-11-09","score":0.00737,"percentile":0.54789,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-79","CWE-80"],"published":"2022-06-08T17:40:11Z","modified":"2026-10-28T02:30:24Z","fixes":[{"ecosystem":"Go","package":"gogs.io/gogs","fixed_in":["0.12.9"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"Go","package":"gogs.io/gogs","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.12.9"}]}]},{"source":"osv","ecosystem":"Go","package":"gogs.io/gogs","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.12.9"}]}]},{"source":"osv","ecosystem":"Go","package":"gogs.io/gogs","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.12.9"}]}]}],"products":[{"vendor":"gogs","product":"gogs"}],"references":[{"url":"https://github.com/gogs/gogs/security/advisories/GHSA-xq4v-vrp9-vcf2","tags":["x_refsource_CONFIRM","x_transferred","Issue Tracking","Third Party Advisory","advisory","web"]},{"url":"https://github.com/gogs/gogs/pull/7009","tags":["x_refsource_MISC","x_transferred","Issue Tracking","Third Party Advisory","fix","web"]},{"url":"https://github.com/gogs/gogs/commit/155cae1de8916fc3fde78f350763034b7422caee","tags":["x_refsource_MISC","x_transferred","Patch","Third Party Advisory","fix","web"]},{"url":"https://github.com/gogs/gogs/releases/tag/v0.12.9","tags":["web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-31038","tags":["advisory"]},{"url":"https://github.com/advisories/GHSA-xq4v-vrp9-vcf2"},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/31xxx/CVE-2022-31038.json","tags":["advisory"]},{"url":"https://github.com/gogs/gogs","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2022-31038","title":"XSS vulnerability in repository issue list in Gogs","description":"Gogs is an open source self-hosted Git service. In versions of gogs prior to 0.12.9 `DisplayName` does not filter characters input from users, which leads to an XSS vulnerability when directly displayed in the issue list. This issue has been resolved in commit 155cae1d which sanitizes `DisplayName` prior to display to the user. All users of gogs are advised to upgrade. Users unable to upgrade should check their users' display names for malicious characters.","status":"published","published":"2022-06-08T17:40:11Z","modified":"2025-04-23T18:18:26.561Z","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":"cna"}],"cwes":["CWE-79"],"updated_at":"2026-11-02T14:34:35.279735Z"}],"euvd":[{"id":"EUVD-2022-6192","description":"Gogs is an open source self-hosted Git service. In versions of gogs prior to 0.12.9 `DisplayName` does not filter characters input from users, which leads to an XSS vulnerability when directly displayed in the issue list. This issue has been resolved in commit 155cae1d which sanitizes `DisplayName` prior to display to the user. All users of gogs are advised to upgrade. Users unable to upgrade should check their users' display names for malicious characters.","status":"published","published":"2022-06-08T17:40:11Z","modified":"2025-04-23T18:18:26Z","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-02T20:52:08.95736Z"}],"ghsa":[{"id":"GHSA-xq4v-vrp9-vcf2","title":"Cross-site Scripting vulnerability in repository issue list in Gogs","description":"### Impact\n`DisplayName` allows all the characters from users, which leads to an XSS vulnerability when directly displayed in the issue list.\n\n### Patches\n`DisplayName` is sanitized before being displayed. Users should upgrade to 0.12.9 or the latest 0.13.0+dev.\n\n### Workarounds\nCheck and update the existing users' display names that contain malicious characters.\n\n### References\nN/A\n\n### For more information\nIf you have any questions or comments about this advisory, please post on https://github.com/gogs/gogs/pull/7009.\n","status":"published","published":"2022-06-08T22:24:25Z","modified":"2023-01-27T05:04:04Z","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","CWE-80"],"updated_at":"2026-11-02T14:36:20.985872Z"}],"nvd":[{"id":"CVE-2022-31038","description":"Gogs is an open source self-hosted Git service. In versions of gogs prior to 0.12.9 `DisplayName` does not filter characters input from users, which leads to an XSS vulnerability when directly displayed in the issue list. This issue has been resolved in commit 155cae1d which sanitizes `DisplayName` prior to display to the user. All users of gogs are advised to upgrade. Users unable to upgrade should check their users' display names for malicious characters.","status":"published","published":"2022-06-09T17:15:09.917Z","modified":"2026-06-17T04:44:39.773Z","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":"secondary"},{"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":"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:21.62951Z"}],"osv":[{"id":"CVE-2022-31038","title":"XSS vulnerability in repository issue list in Gogs","description":"Gogs is an open source self-hosted Git service. In versions of gogs prior to 0.12.9 `DisplayName` does not filter characters input from users, which leads to an XSS vulnerability when directly displayed in the issue list. This issue has been resolved in commit 155cae1d which sanitizes `DisplayName` prior to display to the user. All users of gogs are advised to upgrade. Users unable to upgrade should check their users' display names for malicious characters.","status":"published","published":"2022-06-08T17:40:11Z","modified":"2026-10-28T02:30:24.357965836Z","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:44:25.516981Z"},{"id":"GHSA-xq4v-vrp9-vcf2","title":"Cross-site Scripting vulnerability in repository issue list in Gogs","description":"### Impact\n`DisplayName` allows all the characters from users, which leads to an XSS vulnerability when directly displayed in the issue list.\n\n### Patches\n`DisplayName` is sanitized before being displayed. Users should upgrade to 0.12.9 or the latest 0.13.0+dev.\n\n### Workarounds\nCheck and update the existing users' display names that contain malicious characters.\n\n### References\nN/A\n\n### For more information\nIf you have any questions or comments about this advisory, please post on https://github.com/gogs/gogs/pull/7009.\n","status":"published","published":"2022-06-08T22:24:25Z","modified":"2024-08-21T15:26:42.08892Z","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","CWE-80"],"updated_at":"2026-11-02T15:47:00.198893Z"},{"id":"GO-2022-0483","title":"Cross-site Scripting vulnerability in repository issue list in Gogs in gogs.io/gogs","description":"Cross-site Scripting vulnerability in repository issue list in Gogs in gogs.io/gogs","status":"published","published":"2024-08-21T15:11:33Z","modified":"2026-03-03T04:50:27.221926Z","updated_at":"2026-11-02T15:47:00.918515Z"}]}}
