CriticalCVE-2025-8110

    File overwrite in file update API in Gogs (CVE-2025-8110)

    Published Last modified In CISA KEV since Sources: CVE.org, OSV

    Share

    What is affected, what to do

    Improper Symbolic link handling in the PutContents API in Gogs allows Local Execution of Code.

    The vulnerability is being actively exploited; treat it as a priority. The available sources name no fixed version. Check the vendor guidance in the references below. Immediate actions, mitigation and detection rules are in the runbook below.

    Affected
    • Gogs lte *..0.13.3

    Not sure whether and how you are affected? Ask a question about this vulnerability

    Metrics

    8.8

    Priority

    XIEM Effective CVSS: highest available CVSS rating from NVD and vendor data.

    Source: NVD, CVSS v3

    8.8

    CVSS v3

    Severity High on the scale from 0 to 10.

    Source: CVE.org, OSV

    85.2 %

    EPSS score

    High — model estimates ≥ 50% chance of real-world exploitation within 30 days.

    Source: FIRST EPSS, percentile 99.71

    Show all metrics
    Severity
    Critical
    Priority (0–325)

    The priority score is a consolidated metric that condenses several individual signals into a single, action-guiding ranking: technical severity (CVSS), exploitation likelihood (EPSS), known-exploited status (KEV) and the context of the affected asset. The aim is to answer the only truly important question in vulnerability management: what first?

    Read in glossary
    236.08 Methodology
    Exploit maturity

    An exploit is code or a technique that specifically uses a concrete vulnerability to force unintended behaviour — such as executing code or escalating privileges. It is the tool that turns a theoretical flaw into a practical attack.

    Read in glossary
    actively exploitedSource: VulnCheck KEV (opens in a new tab) How we classify
    XIEM Effective CVSS

    XIEM® is the tiered managed-security operating model from NEOSEC and a registered trademark of NEOSEC GmbH. It extends classic SIEM — the central collection, normalisation and correlation of security-relevant events — with endpoint forensics, network visibility and deception technology, and consolidates them into three building tiers: Sentry, Orchestrate and Command.

    Read in glossary
    8.8 Methodology
    CVSS v3

    CVSS is the globally established, open standard for assessing the technical severity of a vulnerability on a scale from 0 to 10. It describes how easily a flaw can be exploited and what damage it can cause — but not how likely its actual exploitation is. CVSS and the complementary EPSS deliberately answer different questions.

    Read in glossary
    8.8
    CVSS v4

    CVSS is the globally established, open standard for assessing the technical severity of a vulnerability on a scale from 0 to 10. It describes how easily a flaw can be exploited and what damage it can cause — but not how likely its actual exploitation is. CVSS and the complementary EPSS deliberately answer different questions.

    Read in glossary
    8.7
    EPSS score

    The EPSS score is the absolute model output for an individual vulnerability: the estimated probability of real-world exploitation within the next 30 days, expressed as a value between 0 and 1 (i.e. 0 % to 100 %). A score of 0.42 means „the model estimates a 42 % chance of real-world exploitation within 30 days“.

    Read in glossary
    85.2 %
    High — model estimates ≥ 50% chance of real-world exploitation within 30 days.
    EPSS percentile

    The EPSS percentile is the relative position of a vulnerability within all EPSS-scored CVEs, expressed as a value between 0 and 1. A percentile of 0.90 means „this CVE has a higher EPSS score than 90 % of all other scored CVEs“. Unlike the EPSS score, it is not a probability — but a positioning within a ranking.

    Read in glossary
    99.71
    Critical — this CVE ranks in the top fifth of all CVEs scored today (rank ≥ 80%).
    KEV status

    The KEV catalogue is a list maintained by the US authority CISA of vulnerabilities for which active exploitation in the wild has been confirmed. It answers not the question „how severe?“ but „is it already being attacked?“ — thereby sharply prioritising patching.

    Read in glossary
    Actively exploited
    Published
    In CISA KEV since

    The KEV catalogue is a list maintained by the US authority CISA of vulnerabilities for which active exploitation in the wild has been confirmed. It answers not the question „how severe?“ but „is it already being attacked?“ — thereby sharply prioritising patching.

    Read in glossary
    CISA assessment (SSVC)
    Exploitation: active · not automatable · Technical impact: total
    Source: CISA Vulnrichment, as of 13 January 2026
    CWE

    CWE is a catalogue of typical weakness types in software and hardware — such as flawed input validation, unsafe memory handling or poor authentication. Where a CVE names a concrete vulnerability in a concrete product, a CWE describes the underlying class of defect.

    Read in glossary
    CWE-22

    Response and mitigation

    Why act now?

    Prioritisation rationale

    The flaw lets an attacker bypass PutContents path validation with a crafted symlink, overwrite files outside the repository and reach code execution as the service account — network-reachable, low complexity, and gated only by a basic user account that attackers can simply create themselves wherever open registration is on. Exploitation likelihood sits among the very highest of all tracked CVEs, and the observed pattern is automated mass compromise of internet-exposed, self-hosted Git servers. For NIS2-scope organisations, a public Gogs instance with self-registration is a critical, drop-everything item, because source code, deploy keys and CI credentials translate directly into supply-chain risk; internal-only instances without self-registration can be patched as high priority in the next maintenance window. CISA does not flag known ransomware use, but that should not lower urgency for exposed systems.

    1. Runbook step 1

      Immediate response (0-24 h)

      • Cut exposure now: Restrict every internet-facing Gogs instance (default HTTP 3000/tcp, often fronted on 443/tcp; SSH Git usually 22/tcp or 2222/tcp) to VPN or internal source ranges at the firewall or reverse proxy until a fixed build is confirmed.
      • Patch: Version 0.13.3 is listed as affected. A patch is available from the vendor — look up the fixed version in the vendor advisory / Gogs GitHub releases and confirm it addresses symlink handling in the PutContents API before rollout.
      • Disable open sign-up: In app.ini under [service] set DISABLE_REGISTRATION = true (optionally REQUIRE_SIGNIN_VIEW = true) and restart. Exploitation only needs an ordinary account with write access to a repository the attacker owns.
      • Hunt for compromise: Enumerate recently created users and repositories (randomly named ones are a red flag); search the repository root for symlinks (find /data/gogs-repositories -type l -ls) and inspect each bare repo config for unexpected entries such as sshCommand or other core.* settings.
      • If anything turns up, isolate and rotate: Take the host off the network, preserve a forensic image, then treat every secret held by Gogs as burned — deploy keys, access tokens, webhook secrets, the DB password in app.ini, SSH host keys — and reissue them.
    2. Runbook step 2

      Mitigation layers

      • Network segmentation: Place Gogs in its own segment and default-deny egress from the host (allowlist only mail relay, mirror sources, etc.). This blocks payload staging and reverse shells after code execution.
      • WAF / reverse proxy: Restrict PUT and POST on /api/v1/repos/*/*/contents/* to trusted networks or service accounts, or block them outright if web-API file edits aren't operationally required.
      • IAM / least privilege: Disable unknown or unused accounts, limit repository creation for regular users (MAX_CREATION_LIMIT = 0 where workable), and enforce 2FA on admin accounts.
      • Host hardening: Run Gogs under a dedicated unprivileged account; keep app.ini and custom/conf read-only to the service. In containers: read-only root filesystem, no-new-privileges, no Docker socket mounts.
      • Strategic decision: Given the project's patch cadence, evaluate migrating to an actively maintained alternative; until then, do not run internet-exposed Gogs with self-registration enabled.
    3. Runbook step 3

      Detection rules

      • EDR / Sysmon process ancestry: Child processes of the Gogs binary (gogs web) or of git running as the Gogs service account that spawn shells or downloaders (sh, bash, curl, wget, python, nc). Sigma shape: ParentImage|endswith: '/gogs' AND Image|endswith: ['/sh','/bash','/curl','/wget']. On Linux use Sysmon for Linux EID 1 or auditd execve with the Gogs PID as ppid.
      • Web / proxy access logs: PUT /api/v1/repos/<owner>/<repo>/contents/<path> shortly after repo creation (POST /api/v1/user/repos) from the same account or source IP. SPL idea: index=proxy uri_path="/api/v1/repos/*/contents/*" method=PUT | stats count by src_ip, user, uri_path.
      • File integrity (auditd): Writes by the Gogs account to bare-repo config files or to paths outside the repository tree: -w /data/gogs-repositories -p wa -k gogs_repo_write; alert on hits against */config that introduce a sshCommand line.
      • Gogs application log: Bursts of new sign-ups, repos with random-looking names, and immediate commits containing symlink objects (Git mode 120000). Per-repo check: git ls-tree -r HEAD | grep '^120000'.
      • Network telemetry (Zeek / Suricata): New outbound connections from the Gogs host to unfamiliar destinations — long-lived sessions or ELF downloads (files.log with mime_type ELF) — right after API write activity.

    Detection rules

    No NEOSEC detection rule is available for this vulnerability yet.

    Classification under NIS2 and CRA

    Rule-based classification from exploitation status and severity. It does not replace a case-by-case assessment.

    NIS2

    NIS2 is EU Directive (EU) 2022/2555 to raise the level of cybersecurity across the Union. It substantially broadens obligations compared with the first NIS directive: more sectors, mandatory risk management, staged reporting duties and personal accountability of senior management.

    Read in glossary
    Actively exploited: treat the vulnerability as a priority in vulnerability handling under Art. 21(2)(e) NIS2. If it is exploited in your environment, check the reporting obligation under Art. 23 (early warning within 24 hours).
    CRA

    The CRA is EU Regulation (EU) 2024/2847 setting horizontal cybersecurity requirements for „products with digital elements“ — from industrial controllers and software to connected consumer devices. For the first time manufacturers must ensure security across the entire product lifecycle, handle vulnerabilities and provide security updates.

    Read in glossary
    Since 11.09.2026, manufacturers of affected products with digital elements must report actively exploited vulnerabilities under Art. 14 CRA, with an early warning within 24 hours via ENISA's single reporting platform.
    ISO/IEC 27001

    ISO/IEC 27001 is the internationally leading standard for an information security management system (ISMS). It describes a risk-based, process-oriented framework to systematically plan, implement, review and improve information security.

    Read in glossary
    Control A.8.8, management of technical vulnerabilities: assess relevance to your systems, plan remediation and keep evidence.

    Description

    Improper Symbolic link handling in the PutContents API in Gogs allows Local Execution of Code.

    Source: NVD (NIST), OSV (Open Source Vulnerabilities), CISA KEV Catalog, CVE.org (MITRE), cvelistv5

    Affected products

    The following versions are affected. Older releases of the same product line are also vulnerable unless stated otherwise.

    Affected products
    Affected versionsFixed in
    GogsGogs
    • —
    • —
    gogsgogs
    • ≤ 0.13.3
    • —

    Vendors and products

    Weakness classes (CWE)

    • CWE-22Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')

      Base

      The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.

      Entry at MITRE CWE-22

    Public exploit references

    Publicly reported proof-of-concepts, exploit modules and detection templates for this vulnerability. NEOSEC links to the original sources only and does not provide any exploit code.

    Public exploit references
    CISA KEV CatalogCISA Known Exploited Vulnerability (opens in a new tab)cisa.govactively exploited
    PoC-in-GitHub (nomi-sec)CVE-2025-8110 (opens in a new tab)github.comPoC (publicly reported)reported, not verified
    PoC-in-GitHub (nomi-sec)CVE-2025-8110 (opens in a new tab)github.comPoC (publicly reported)reported, not verified
    PoC-in-GitHub (nomi-sec)CVE-2025-8110 (opens in a new tab)github.comPoC (publicly reported)reported, not verified
    PoC-in-GitHub (nomi-sec)CVE-2025-8110-gogs-poc (opens in a new tab)github.comPoC (publicly reported)reported, not verified
    PoC-in-GitHub (nomi-sec)ghostlink-writeup (opens in a new tab)github.comPoC (publicly reported)reported, not verified
    PoC-in-GitHub (nomi-sec)CVE-2025-8110 (opens in a new tab)github.comPoC (publicly reported)reported, not verified
    PoC-in-GitHub (nomi-sec)CVE-2025-8110-PoC (opens in a new tab)github.comPoC (publicly reported)reported, not verified
    PoC-in-GitHub (nomi-sec)coreweave-demo-2026-05 (opens in a new tab)github.comPoC (publicly reported)reported, not verified

    References & sources

    Changes to this CVE

    Who changed this CVE and when: NVD (analysis, affected products, CVSS), the CVE publisher (CNA) and additional providers such as CISA (ADP).

    One NVD translation into another language is hidden.

    Embed badge

    Show the severity and KEV status of this vulnerability on your site – with a link back here. The image is updated hourly.

    Badge preview for CVE-2025-8110
    <a href="https://intel.neosec.eu/en/cve/CVE-2025-8110"><img src="https://intel.neosec.eu/badge/cve/CVE-2025-8110.svg?lang=en" alt="CVE-2025-8110 – NEOSEC Intel" height="20"></a>