CVE-2025-47943

CVE-2025-47943 is a medium-severity cross-site scripting (XSS) vulnerability in github.com/gogs/gogs (go), affecting versions < 0.13.3-0.20250608224432-110117b2e5e5. It is fixed in 0.13.3-0.20250608224432-110117b2e5e5.

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:

# 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

Impact

Untrusted input is rendered as active markup in a victim's browser, which can run script in their session. Typical impact: session or credential theft, and actions taken as the user.

CVE-2025-47943 has a CVSS score of 6.3 (Medium). The vector is network-reachable, low privileges required, and user interaction required. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (0.13.3-0.20250608224432-110117b2e5e5); upgrading removes the vulnerable code path.

Affected versions

github.com/gogs/gogs (< 0.13.3-0.20250608224432-110117b2e5e5) gogs.io/gogs (< 0.13.3-0.20250608224432-110117b2e5e5)

Security releases

github.com/gogs/gogs → 0.13.3-0.20250608224432-110117b2e5e5 (go) gogs.io/gogs → 0.13.3-0.20250608224432-110117b2e5e5 (go)

Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.

See it in your environment

Remediation advice

Upgrade the following packages to resolve this vulnerability:

github.com/gogs/gogs to 0.13.3-0.20250608224432-110117b2e5e5 or later; gogs.io/gogs to 0.13.3-0.20250608224432-110117b2e5e5 or later

Kodem Kai can prioritize this vulnerability in your dependency tree and generate a fix recommendation.

Frequently Asked Questions

  1. What is CVE-2025-47943? CVE-2025-47943 is a medium-severity cross-site scripting (XSS) vulnerability in github.com/gogs/gogs (go), affecting versions < 0.13.3-0.20250608224432-110117b2e5e5. It is fixed in 0.13.3-0.20250608224432-110117b2e5e5. Untrusted input is rendered as active markup in a victim's browser, which can run script in their session.
  2. How severe is CVE-2025-47943? CVE-2025-47943 has a CVSS score of 6.3 (Medium). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
  3. Which packages are affected by CVE-2025-47943?
    • github.com/gogs/gogs (go) (versions < 0.13.3-0.20250608224432-110117b2e5e5)
    • gogs.io/gogs (go) (versions < 0.13.3-0.20250608224432-110117b2e5e5)
  4. Is there a fix for CVE-2025-47943? Yes. CVE-2025-47943 is fixed in 0.13.3-0.20250608224432-110117b2e5e5. Upgrade to this version or later.
  5. Is CVE-2025-47943 exploitable, and should I be worried? Whether CVE-2025-47943 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
  6. What actually determines whether CVE-2025-47943 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
  7. How do I fix CVE-2025-47943?
    • Upgrade github.com/gogs/gogs to 0.13.3-0.20250608224432-110117b2e5e5 or later
    • Upgrade gogs.io/gogs to 0.13.3-0.20250608224432-110117b2e5e5 or later

Other vulnerabilities in github.com/gogs/gogs

Stop the waste.
Protect your environment with Kodem.