CVE-2025-47943: Gogs XSS allowed by stored call in PDF renderer
Summary A stored XSS is present in Gogs which allows client-side Javascript code execution. Details Gogs Version: Application version: 0.14.0+dev Local setup using: 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.
Published Jun 26, 2025 · Updated Jul 30, 2025
Affected packages
github.com/gogs/gogs
- Ecosystem
- Go
- Affected
- < 0.13.3-0.20250608224432-110117b2e5e5
- Fixed in
- 0.13.3-0.20250608224432-110117b2e5e5
- Check
go list -m github.com/gogs/gogs
gogs.io/gogs
- Ecosystem
- Go
- Affected
- < 0.13.3-0.20250608224432-110117b2e5e5
- Fixed in
- 0.13.3-0.20250608224432-110117b2e5e5
- Check
go list -m gogs.io/gogs
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
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.3MBApplication version: 0.14.0+dev
Local setup using:
# 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/gogsThe 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
- 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.
- Click on the file to be previewed.
poc
Credits
Edoardo Ottavianelli
Credited to edoardottt.
References
- https://github.com/gogs/gogs/security/advisories/GHSA-xh32-cx6c-cp4v
- https://nvd.nist.gov/vuln/detail/CVE-2025-47943
- https://github.com/gogs/gogs/commit/110117b2e5e5baa4809c819bec701e929d2d8d40
- https://github.com/gogs/gogs/releases/tag/v0.13.3
- https://www.hacktivesecurity.com/blog/2025/07/15/cve-2025-47943-stored-xss-in-gogs-via-pdf
- https://github.com/advisories/GHSA-xh32-cx6c-cp4v
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
More Go vulnerabilities
All Go entriesCVE-2026-52800
Gogs Vulnerable to CSRF Leading to Organization Owner Takeover
high8.8Jun 23, 2026CVE-2026-52801
Gogs has the ability to import local repositories via Mirror Settings
high8.1Jun 23, 2026CVE-2026-52802
Gogs has an Open Redirect via redirect_to
medium5.4Jun 23, 2026CVE-2026-52804
Gogs Vulnerable to Privilege Escalation via Collaboration Access Mode Validation
medium5.5Jun 23, 2026CVE-2026-52805
Gogs has a Migration Redirect Bypass that Leads to Internal Repository Theft
high8.7Jun 23, 2026CVE-2026-52806
Gogs vulnerable to RCE via git rebase --exec argument injection in pull request merge
critical9.9Jun 23, 2026
