CVE-2025-47943: Github.com/gogs/gogs Cross-Site Scripting Vulnerability
MODERATECVE-2025-47943 is a MODERATE (CVSS 6.3) cross-site scripting vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Github.com/gogs/gogs libraries in the Go ecosystem. The issue involves gogs xss allowed by stored call in pdf renderer. Remediation is available by upgrading affected packages to version 0.13.3-0.20250608224432-110117b2e5e5.
CVE-2025-47943 at a Glance
Security Impact
CVSS: 6.3
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:L/A:N).
How to Fix CVE-2025-47943
To remediate this vulnerability, upgrade all affected Github.com/gogs/gogs dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade github.com/gogs/gogs to 0.13.3-0.20250608224432-110117b2e5e5
Upgrade gogs.io/gogs to 0.13.3-0.20250608224432-110117b2e5e5
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/gogs/gogs
How to Check if You Are Affected
To determine whether your application is affected by CVE-2025-47943, inspect your project dependencies for Github.com/gogs/gogs:
inspect dependencies for github.com/gogs/gogs
Analyze the terminal output to locate any version of Github.com/gogs/gogs in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.13.3-0.20250608224432-110117b2e5e5), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'), where the product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. In Github.com/gogs/gogs, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2025-47943 Affected Github.com/gogs/gogs Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/gogs/gogs
|
Go |
< 0.13.3-0.20250608224432-110117b2e5e5
|
0.13.3-0.20250608224432-110117b2e5e5
|
|
gogs.io/gogs
|
Go |
< 0.13.3-0.20250608224432-110117b2e5e5
|
0.13.3-0.20250608224432-110117b2e5e5
|
References
Frequently Asked Questions
What is CVE-2025-47943?
Which Github.com/gogs/gogs versions are affected?
What version fixes CVE-2025-47943?
Is github.com/gogs/gogs affected?
Is gogs.io/gogs affected?
What is the CVSS score of CVE-2025-47943?
What CWE is associated with CVE-2025-47943?
How can I check Go dependencies for CVE-2025-47943?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-xh32-cx6c-cp4v",
"modified" : "2025-07-30T17:45:37Z",
"published" : "2025-06-26T16:54:01Z",
"aliases" : [ "CVE-2025-47943" ],
"summary" : "Gogs XSS allowed by stored call in PDF renderer",
"details" : "### 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\n\n\n### Credits\n\nEdoardo Ottavianelli",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:L/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/gogs/gogs"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.13.3-0.20250608224432-110117b2e5e5"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Go",
"name" : "gogs.io/gogs"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.13.3-0.20250608224432-110117b2e5e5"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/gogs/gogs/security/advisories/GHSA-xh32-cx6c-cp4v"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-47943"
}, {
"type" : "WEB",
"url" : "https://github.com/gogs/gogs/commit/110117b2e5e5baa4809c819bec701e929d2d8d40"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/gogs/gogs"
}, {
"type" : "WEB",
"url" : "https://github.com/gogs/gogs/releases/tag/v0.13.3"
}, {
"type" : "WEB",
"url" : "https://www.hacktivesecurity.com/blog/2025/07/15/cve-2025-47943-stored-xss-in-gogs-via-pdf"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-79" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2025-06-26T16:54:01Z",
"nvd_published_at" : "2025-06-24T04:15:46Z"
}
}