# CVE-2022-31038: XSS vulnerability in repository issue list in Gogs

- Severity: Medium 5.4 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.74%, higher than 55% of CVEs (2026-12-01)
- Published: 2022-06-08T17:40:11.000Z
- Modified: 2026-06-17T04:44:39.773Z
- Also known as: GHSA-xq4v-vrp9-vcf2, GO-2022-0483
- Weaknesses: CWE-79, CWE-80
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- gogs gogs: < 0.12.9; before 0.12.9
- gogs.io/gogs (Go): before 0.12.9

## Every score

- GitHub_M: CVSS:3.1 5.4 Medium `CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N`
- GitHub: CVSS:3.1 5.4 Medium `CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N`
- NVD: CVSS:3.1 5.4 Medium `CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N`
- NVD: CVSS:2.0 3.5 Low `AV:N/AC:M/Au:S/C:N/I:P/A:N`

## References

- <https://github.com/gogs/gogs/security/advisories/GHSA-xq4v-vrp9-vcf2> (advisory, issue-tracking, third-party-advisory, web)
- <https://github.com/gogs/gogs/pull/7009> (issue-tracking, third-party-advisory, web)
- <https://github.com/gogs/gogs/commit/155cae1de8916fc3fde78f350763034b7422caee> (patch, third-party-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2022-31038> (advisory)
- <https://github.com/gogs/gogs> (package)
- <https://github.com/gogs/gogs/releases/tag/v0.12.9> (web)

## Sources

- CVE List: [CVE-2022-31038](https://www.cve.org/CVERecord?id=CVE-2022-31038), CVE Terms of Use, modified 2025-04-23
- GitHub Advisory Database: [GHSA-xq4v-vrp9-vcf2](https://github.com/advisories/GHSA-xq4v-vrp9-vcf2), CC-BY-4.0, modified 2024-08-21
- Go Vulnerability Database: [GO-2022-0483](https://pkg.go.dev/vuln/GO-2022-0483), CC-BY-4.0, modified 2026-03-03
- NVD: [CVE-2022-31038](https://nvd.nist.gov/vuln/detail/CVE-2022-31038), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2022-31038 · Whole record: https://cve.day/CVE-2022-31038.json · Rebuilt by cve.day 2026-11-25T22:58:12.201Z
