CVE-2026-123012
In Gogs 0.14.3, the Git Smart HTTP authorization layer in internal/route/repo/http.go allows a...
In Gogs 0.14.3, the Git Smart HTTP authorization layer in internal/route/repo/http.go allows a push when only read access was intended, a different vulnerability than CVE-2026-52810. This occurs because of a case-sensitivity desync between the authorization classifier and the request dispatcher: the gitHTTPIsPull function compares the Git action verb case-sensitively and defaults to pull (read access) for any unrecognized string, whereas the request dispatcher lowercases the same verb before routing it to the receive-pack handler. Capitalizing a single letter in the URL (e.g. info/Refs instead of info/refs, or git-receive-Pack instead of git-receive-pack) causes the classifier to misidentify a push as a pull, granting only read-level authorization, whereas the dispatcher routes it to the write handler. An authenticated read-only collaborator can exploit this to push to a private repository, creating, updating, or deleting refs.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- Low
- User interaction
- None
What an attacker can affect
- Confidentiality
- None
- Integrity
- High
- Availability
- Low
Exploit likelihood
What each source reports
CVE List Score used
7.1
In Gogs 0.14.3, the Git Smart HTTP authorization layer in internal/route/repo/http.go allows a push when only read access was intended, a different vulnerability than CVE-2026-52810. This occurs because of a case-sensitivity desync between the authorization classifier and the request dispatcher: the gitHTTPIsPull function compares the Git action verb case-sensitively and defaults to pull (read access) for any unrecognized string, whereas the request dispatcher lowercases the same verb before routing it to the receive-pack handler. Capitalizing a single letter in the URL (e.g. info/Refs instead of info/refs, or git-receive-Pack instead of git-receive-pack) causes the classifier to misidentify a push as a pull, granting only read-level authorization, whereas the dispatcher routes it to the write handler. An authenticated read-only collaborator can exploit this to push to a private repository, creating, updating, or deleting refs.
- Record
CVE-2026-123012- CVSS 4.0
- 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:L/SA:N - Weakness
- CWE-178
- Updated
- 2026-11-06
EUVDEUVD-2026-117331
7.1
In Gogs 0.14.3, the Git Smart HTTP authorization layer in internal/route/repo/http.go allows a push when only read access was intended, a different vulnerability than CVE-2026-52810. This occurs because of a case-sensitivity desync between the authorization classifier and the request dispatcher: the gitHTTPIsPull function compares the Git action verb case-sensitively and defaults to pull (read access) for any unrecognized string, whereas the request dispatcher lowercases the same verb before routing it to the receive-pack handler. Capitalizing a single letter in the URL (e.g. info/Refs instead of info/refs, or git-receive-Pack instead of git-receive-pack) causes the classifier to misidentify a push as a pull, granting only read-level authorization, whereas the dispatcher routes it to the write handler. An authenticated read-only collaborator can exploit this to push to a private repository, creating, updating, or deleting refs.
- Record
EUVD-2026-117331- CVSS 4.0
- 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:L/SA:N - Updated
- 2026-11-06
GitHub AdvisoriesGHSA-hqvj-j27r-9j7c
7.1
In Gogs 0.14.3, the Git Smart HTTP authorization layer in internal/route/repo/http.go allows a...
In Gogs 0.14.3, the Git Smart HTTP authorization layer in internal/route/repo/http.go allows a push when only read access was intended, a different vulnerability than CVE-2026-52810. This occurs because of inconsistency about whether a verb is checked in a case-sensitive manner.
- Record
GHSA-hqvj-j27r-9j7c- CVSS 4.0
- 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:L/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X - Weakness
- CWE-178
- Updated
- 2026-11-06
NVD
7.1
In Gogs 0.14.3, the Git Smart HTTP authorization layer in internal/route/repo/http.go allows a push when only read access was intended, a different vulnerability than CVE-2026-52810. This occurs because of a case-sensitivity desync between the authorization classifier and the request dispatcher: the gitHTTPIsPull function compares the Git action verb case-sensitively and defaults to pull (read access) for any unrecognized string, whereas the request dispatcher lowercases the same verb before routing it to the receive-pack handler. Capitalizing a single letter in the URL (e.g. info/Refs instead of info/refs, or git-receive-Pack instead of git-receive-pack) causes the classifier to misidentify a push as a pull, granting only read-level authorization, whereas the dispatcher routes it to the write handler. An authenticated read-only collaborator can exploit this to push to a private repository, creating, updating, or deleting refs.
- Record
CVE-2026-123012- CVSS 4.0
- 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:L/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X - Weakness
- CWE-178
- Updated
- 2026-11-06
OSV
7.1
In Gogs 0.14.3, the Git Smart HTTP authorization layer in internal/route/repo/http.go allows a push when only read access was intended, a different vulnerability than CVE-2026-52810. This occurs because of a case-sensitivity desync between the authorization classifier and the request dispatcher: the gitHTTPIsPull function compares the Git action verb case-sensitively and defaults to pull (read access) for any unrecognized string, whereas the request dispatcher lowercases the same verb before routing it to the receive-pack handler. Capitalizing a single letter in the URL (e.g. info/Refs instead of info/refs, or git-receive-Pack instead of git-receive-pack) causes the classifier to misidentify a push as a pull, granting only read-level authorization, whereas the dispatcher routes it to the write handler. An authenticated read-only collaborator can exploit this to push to a private repository, creating, updating, or deleting refs.
- Record
CVE-2026-123012- CVSS 4.0
- 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:L/SA:N - Weakness
- CWE-178
- Updated
- 2026-11-07
OSVCVE-2026-52810
7.1
Gogs: Write to readonly repositories using receive-pack + service=git-upload-pack confusion
Gogs is an open source self-hosted Git service. Prior to 0.14.3, 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. This vulnerability is fixed in 0.14.3.
- Record
CVE-2026-52810- CVSS 4.0
- 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 - Weakness
- CWE-284
- Updated
- 2026-11-05
OSVGHSA-wmfg-5p4h-5fw3
7.1
Gogs allows users to write to readonly repositories using receive-pack + service=git-upload-pack confusion
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
- Create a Gogs instance (eg. http://localhost:3000) with 2 users:
victim&attacker - 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" />
- As the attacker, execute the following Python script (editing global vars as required):
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 = {}…
- Record
GHSA-wmfg-5p4h-5fw3- CVSS 4.0
- 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 - Weakness
- CWE-284
- Updated
- 2026-11-05
OSVGO-2026-5712 No score
Gogs allows users to write to readonly repositories using receive-pack + service=git-upload-pack confusion in gogs.io/gogs
Gogs allows users to write to readonly repositories using receive-pack + service=git-upload-pack confusion in gogs.io/gogs.
NOTE: The source advisory for this report contains additional versions that could not be automatically mapped to standard Go module versions.
(If this is causing false-positive reports from vulnerability scanners, please suggest an edit to the report.)
The additional affected modules and versions are: gogs.io/gogs before v0.14.3.
- Record
GO-2026-5712- Updated
- 2026-11-05
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
gogs.io/gogsGo From an advisory covering 2 CVEs |
before 0.14.3 | 0.14.3 |
gogs.io/gogsGo From an advisory covering 2 CVEs |
All versions | None known |
History
| Recorded | Changed | Sources |
|---|---|---|
| references | NVD, OSV | |
| references | GitHub Advisories | |
| description, references | CVE List | |
| references | EUVD | |
| affected, facts | ||
| affected, aliases, cwes, facts, published, references | EUVD, OSV | |
| aliases, cwes, references, severity, title | CVE List, GitHub Advisories, NVD | |
| first indexed | EUVD |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2026-123012 is a high vulnerability (CVSS 7.1) in Gogs, published June 23, 2026. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.34%, the 27th percentile. No source names a fixed version.
References
github.com/gogs/gogs/security/advisories/GHSA-wmfg-5p4h-5fw3
github.com/gogs/gogs/blob/3ba8aca90e17e5410b7e8b227c9f29256ac3e875/internal/route/repo/http.go
humanoid.sh/blog/gogs-cve-2026-123012
nvd.nist.gov/vuln/detail/CVE-2026-123012
github.com/advisories/GHSA-hqvj-j27r-9j7c
github.com/CVEProject/cvelistV5/tree/main/cves/2026/123xxx/CVE-2026-123012.json
Left out here: the rest of 1 source description. The JSON record has them.