CVE-2022-31038
JSON

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 packageVersionsReported by
gogs gogs< 0.12.9, before 0.12.9CVE List, NVD
gogs.io/gogs (Go)before 0.12.9GitHub Advisory Database, Go Vulnerability Database

All scores

GitHub_M5.4medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
GitHub5.4medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
NVD5.4medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
NVD3.5low CVSS:2.0AV:N/AC:M/Au:S/C:N/I:P/A:N

Classification

CWE-79CWE-80

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

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

Sources

SourceRecordLicence
CVE ListCVE-2022-31038 changed 2025-04-23CVE Terms of Use
GitHub Advisory DatabaseGHSA-xq4v-vrp9-vcf2 changed 2024-08-21CC-BY-4.0
Go Vulnerability DatabaseGO-2022-0483 changed 2026-03-03CC-BY-4.0
NVDCVE-2022-31038 changed 2026-06-17Public domain