What’s Vulnerable › Vulnerabilities
CVE-2022-31038: XSS vulnerability in repository issue list in Gogs
- Severity: medium (CVSS 5.4 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 0.7% probability of exploitation in the next 30 days
- Public exploit or detection template: none known
- Published: 2022-06-09 · updated 2026-06-17
- Weakness: CWE-79
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.
Affected products
- gogs: before 0.12.9 — fixed in 0.12.9
How to fix
Upgrade to a fixed version: gogs 0.12.9. Check the vendor advisory for mitigations.
References
- https://github.com/gogs/gogs/commit/155cae1de8916fc3fde78f350763034b7422caee
- https://github.com/gogs/gogs/pull/7009
- https://github.com/gogs/gogs/security/advisories/GHSA-xq4v-vrp9-vcf2
- https://github.com/gogs/gogs/commit/155cae1de8916fc3fde78f350763034b7422caee
- https://github.com/gogs/gogs/pull/7009
- https://github.com/gogs/gogs/security/advisories/GHSA-xq4v-vrp9-vcf2
Get alerted when CVE-2022-31038 or the next vulnerability affects your stack