# GHSA-pj96-4jhv-v792: Cross site scripting via cookies in gogs

- Severity: Low (rating, scored by GitHub)
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Published: 2022-06-02T20:46:30.000Z
- Modified: 2026-03-03T04:50:25.674Z
- Also known as: GO-2022-0473
- Weaknesses: CWE-79

## Description

### Impact

There is no known practical impact other than it is just possible to manipulate CSRF cookie and XSS the malicious user self.

### Patches

Invalid characters of CSRF tokens are stripped after reading cookie. Users should upgrade to 0.12.8 or the latest 0.13.0+dev.

### Workarounds

No need for workarounds.

### References

N/A

### For more information

If you have any questions or comments about this advisory, please post on https://github.com/gogs/gogs/issues/6953.

(As written by GitHub Advisory Database.)

## Affected

- gogs.io/gogs (Go): before 0.12.8

## References

- <https://github.com/gogs/gogs/security/advisories/GHSA-pj96-4jhv-v792> (advisory, web)
- <https://github.com/gogs/gogs/issues/6953> (web)
- <https://github.com/gogs/gogs> (package)

## Sources

- GitHub Advisory Database: [GHSA-pj96-4jhv-v792](https://github.com/advisories/GHSA-pj96-4jhv-v792), CC-BY-4.0, modified 2024-08-21
- Go Vulnerability Database: [GO-2022-0473](https://pkg.go.dev/vuln/GO-2022-0473), CC-BY-4.0, modified 2026-03-03

---

Page: https://cve.day/GHSA-pj96-4jhv-v792 · Whole record: https://cve.day/GHSA-pj96-4jhv-v792.json · Rebuilt by cve.day 2026-11-25T22:56:23.136Z
