5.4medium
XSS vulnerability in repository issue list in Gogs
- Severity
- 5.4medium CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.74% (higher than 55% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-xq4v-vrp9-vcf2GO-2022-0483
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
| Product or package | Versions | Reported by |
|---|---|---|
| gogs gogs | < 0.12.9, before 0.12.9 | CVE List, NVD |
| gogs.io/gogs (Go) | before 0.12.9 | GitHub Advisory Database, Go Vulnerability Database |
All scores
| GitHub_M | 5.4medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N |
| GitHub | 5.4medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N |
| NVD | 5.4medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N |
| NVD | 3.5low CVSS:2.0 | AV:N/AC:M/Au:S/C:N/I:P/A:N |
Classification
What each source says
CVE List
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.
GitHub Advisory Database
Impact
DisplayName allows all the characters from users, which leads to an XSS vulnerability when directly displayed in the issue list.
Patches
DisplayName is sanitized before being displayed. Users should upgrade to 0.12.9 or the latest 0.13.0+dev.
Workarounds
Check and update the existing users' display names that contain malicious characters.
References
N/A
For more information
If you have any questions or comments about this advisory, please post on https://github.com/gogs/gogs/pull/7009.
Go Vulnerability Database
Cross-site Scripting vulnerability in repository issue list in Gogs in gogs.io/gogs
NVD (es)
Gogs es un servicio Git de código abierto auto alojado. En versiones de gogs anteriores a 0.12.9 "DisplayName" no filtra la entrada de caracteres de los usuarios, lo que conlleva a una vulnerabilidad de tipo XSS cuando es mostrado directamente en la lista de problemas. Este problema ha sido resuelto en el commit 155cae1d que sanea "DisplayName" antes de mostrarlo al usuario. Es recomendado a todos los usuarios de gogs actualizar. Los usuarios que no puedan actualizarse deberían comprobar si los nombres de pantalla de sus usuarios contienen caracteres maliciosos
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
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2022-31038 changed 2025-04-23 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-xq4v-vrp9-vcf2 changed 2024-08-21 | CC-BY-4.0 |
| Go Vulnerability Database | GO-2022-0483 changed 2026-03-03 | CC-BY-4.0 |
| NVD | CVE-2022-31038 changed 2026-06-17 | Public domain |