{"id":"CVE-2025-47943","aliases":["CVE-2025-47943","GHSA-xh32-cx6c-cp4v","GO-2025-3778"],"related":[],"kind":"vulnerability","state":"published","title":"Gogs stored XSS in PDF renderer","summary":"Gogs is an open source self-hosted Git service. In application version 0.14.0+dev and prior, there is a stored cross-site scripting (XSS) vulnerability present in Gogs, which allows client-side Javascript code execution. The vulnerability is caused by the usage of a vulnerable and outdated component: pdfjs-1.4.20 under public/plugins/. This issue has been fixed for gogs.io/gogs in version 0.13.3.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Gogs is an open source self-hosted Git service. In application version 0.14.0+dev and prior, there is a stored cross-site scripting (XSS) vulnerability present in Gogs, which allows client-side Javascript code execution. The vulnerability is caused by the usage of a vulnerable and outdated component: pdfjs-1.4.20 under public/plugins/. This issue has been fixed for gogs.io/gogs in version 0.13.3.","source":"cvelist"},{"lang":"en","text":"### Summary\n\nA stored XSS is present in Gogs which allows client-side Javascript code execution.\n\n### Details\n\nGogs Version:\n```\ndocker images\nREPOSITORY   TAG       IMAGE ID       CREATED        SIZE\ngogs/gogs    latest    fe92583bc4fe   10 hours ago   99.3MB\n```\n\nApplication version: `0.14.0+dev`\n\nLocal setup using:\n```bash\n# Pull image from Docker Hub.\ndocker pull gogs/gogs\n\n# Create local directory for volume.\nsudo mkdir -p /var/gogs\n\n# Use `docker run` for the first time.\ndocker run --name=gogs -p 10022:22 -p 10880:3000 -v /var/gogs:/data gogs/gogs\n```\n\nThe vulnerability is caused by the usage of a vulnerable and outdated component: `pdfjs-1.4.20` under public/plugins/.  \nRead more about this vulnerability at [codeanlabs - CVE-2024-4367](https://codeanlabs.com/blog/research/cve-2024-4367-arbitrary-js-execution-in-pdf-js/).\n\n### PoC\n\n1. 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.\n2. Click on the file to be previewed.\n\n![poc](https://github.com/user-attachments/assets/5af1303e-8751-49c8-af2e-d0631dd18957)\n\n\n### Credits\n\nEdoardo Ottavianelli","format":"markdown","source":"ghsa"},{"lang":"en","text":"Gogs XSS allowed by stored call in PDF renderer in gogs.io/gogs","format":"markdown","source":"go"},{"lang":"es","text":"Gogs es un servicio Git autoalojado de código abierto. En la versión 0.14.0+dev y anteriores de la aplicación, existe una vulnerabilidad de cross-site scripting (XSS) almacenado en Gogs, que permite la ejecución de código Javascript del lado del cliente. La vulnerabilidad se debe al uso de un componente vulnerable y obsoleto: pdfjs-1.4.20, ubicado en public/plugins/. Este problema se ha corregido para gogs.io/gogs en la versión 0.13.3.","source":"nvd"}],"published":"2025-06-24T03:48:06.012Z","modified":"2026-09-10T03:50:25.589Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:L/A:N","score":6.3,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:L/A:N","score":6.3,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:L/A:N","score":6.3,"rating":"MEDIUM"}],"cwes":["CWE-79"],"affected":[{"ranges":[{"version":"<= 0.14.0+dev","status":"affected"}],"vendor":"gogs","product":"gogs","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.13.3-0.20250608224432-110117b2e5e5"}],"ecosystem":"Go","package":"github.com/gogs/gogs","purl":"pkg:golang/github.com/gogs/gogs","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.13.3-0.20250608224432-110117b2e5e5"}],"ecosystem":"Go","package":"gogs.io/gogs","purl":"pkg:golang/gogs.io/gogs","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.13.3-0.20250608224432-110117b2e5e5"}],"ecosystem":"Go","package":"gogs.io/gogs","purl":"pkg:golang/gogs.io/gogs","source":"go"}],"references":[{"url":"https://github.com/gogs/gogs/security/advisories/GHSA-xh32-cx6c-cp4v","tags":["advisory","exploit","web","x-refsource-confirm"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/gogs/gogs/commit/110117b2e5e5baa4809c819bec701e929d2d8d40","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://github.com/gogs/gogs/releases/tag/v0.13.3","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://www.hacktivesecurity.com/blog/2025/07/15/cve-2025-47943-stored-xss-in-gogs-via-pdf","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-47943","tags":["advisory"],"sources":["ghsa","go"]},{"url":"https://github.com/gogs/gogs","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"partial","date":"2025-06-24T21:48:30.476Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-47943","url":"https://www.cve.org/CVERecord?id=CVE-2025-47943","licence":"CVE Terms of Use","modified":"2025-07-30T17:45:57.812Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-xh32-cx6c-cp4v","url":"https://github.com/advisories/GHSA-xh32-cx6c-cp4v","licence":"CC-BY-4.0","modified":"2026-09-10T03:50:25.589Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2025-3778","url":"https://pkg.go.dev/vuln/GO-2025-3778","licence":"CC-BY-4.0","modified":"2026-03-03T04:56:42.129Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-47943","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-47943","licence":"Public domain","modified":"2026-06-17T09:28:52.577Z"}],"updatedAt":"2026-11-25T22:58:59.554Z","epss":{"score":0.00536,"percentile":0.46644,"date":"2026-12-01T12:00:22.000Z"}}