CVE-2022-1464
Gogs vulnerability analysis and mitigation

Overview

A stored XSS vulnerability was discovered in GitHub repository gogs/gogs prior to version 0.12.7 (CVE-2022-1464). The vulnerability exists in the repository's public access functionality where any user can view reports and when opening attachments, malicious JavaScript code could be executed in the victim's account (NVD).

Technical details

The vulnerability is classified as a Cross-Site Scripting (CWE-79) issue with a CVSS v3.1 base score of 5.4 (Medium) according to NVD, and 7.3 (High) according to huntr.dev. The vulnerability allows execution of arbitrary JavaScript code through report attachments in the public repository section (NVD).

Impact

When exploited, this vulnerability allows attackers to execute arbitrary JavaScript code in the context of other users' sessions who view the malicious attachment. This could potentially lead to account compromise, data theft, or other malicious actions performed under the victim's account privileges (NVD).

Mitigation and workarounds

The vulnerability has been patched in Gogs version 0.12.7. The fix involves implementing Content Security Policy (CSP) headers in the attachment serving endpoint to prevent execution of arbitrary JavaScript code (GitHub Patch). Users are advised to upgrade to version 0.12.7 or later to mitigate this vulnerability.

Additional resources


SourceThis report was generated using AI

Related Gogs vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2024-56731CRITICAL9.8
  • GogsGogs
  • gogs.io/gogs
NoYesJun 24, 2025
CVE-2024-44625HIGH8.8
  • GogsGogs
  • gogs
NoYesNov 15, 2024
CVE-2025-8110HIGH8.7
  • GogsGogs
  • gogs.io/gogs
NoNoDec 10, 2025
CVE-2024-55947HIGH8.7
  • GogsGogs
  • govulncheck-vulndb
NoYesDec 23, 2024
CVE-2024-54148HIGH8.7
  • GogsGogs
  • gogs.io/gogs
NoYesDec 23, 2024

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management