GitHub Advisoryadvisory · Go
GHSA-xh32-cx6c-cp4v Gogs XSS allowed by stored call in PDF renderer
MEDIUM
Official page ↗
- Aliases
- CVE-2025-47943
- Ecosystem
- Go
- Packages
- github.com/gogs/gogs, gogs.io/gogs
- Severity
- Moderate
- CVSS vector
- CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:L/A:N
- Weaknesses
- CWE-79
- Reviewed
- 2025-06-26
Affected packages
• Go github.com/gogs/gogs: < 0.13.3-0.20250608224432-110117b2e5e5 → fixed in 0.13.3-0.20250608224432-110117b2e5e5
• Go gogs.io/gogs: < 0.13.3-0.20250608224432-110117b2e5e5 → fixed in 0.13.3-0.20250608224432-110117b2e5e5
Description
Summary
A stored XSS is present in Gogs which allows client-side Javascript code execution.
Details
Gogs Version:
```
docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
gogs/gogs latest fe92583bc4fe 10 hours ago 99.3MB
```
Application version: `0.14.0+dev`
Local setup using:
```bash
Pull image from Docker Hub.
docker pull gogs/gogs
Create local directory for volume.
sudo mkdir -p /var/gogs
Use `docker run` for the first time.
docker run --name=gogs -p 10022:22 -p 10880:3000 -v /var/gogs:/data gogs/gogs
```
The vulnerability is caused by the usage of a vulnerable and outdated component: `pdfjs-1.4.20` under public/plugins/.
Read more about this vulnerability at codeanlabs - CVE-2024-4367.
PoC
1. Upload the Proof of Concept file hosted at https://codeanlabs.com/wp-content/uploads/2024/05/poc_generalized_CVE-2024-4367.pdf in a repository.
2. Click on the file to be previewed.
Credits
Edoardo Ottavianelli
Related
Alias · CVE (1)
- CVE-2025-47943 Gogs is an open source self-hosted Git service. vulnerability
Weakness · CWE (1)
- CWE-79 Improper Neutralization of Input During Web Page Generation weakness
References
- https://github.com/gogs/gogs/security/advisories/GHSA-xh32-cx6c-cp4v web
- https://nvd.nist.gov/vuln/detail/CVE-2025-47943 advisory
- https://github.com/gogs/gogs/commit/110117b2e5e5baa4809c819bec701e929d2d8d40 web
- https://github.com/gogs/gogs package
- https://github.com/gogs/gogs/releases/tag/v0.13.3 web
- https://www.hacktivesecurity.com/blog/2025/07/15/cve-2025-47943-stored-xss-in-gogs-via-pdf web