Live Exposure Defense: From CVE to Confirmed Exposure in 12 Hours – See more

New CVE Detected

CVE-2026-20706 – Token Scope Bypass Allows Unauthorized Repository Archive Downloads – Gitea ≤ 1….

Be the first to know when new zero-days emerge:

Summary

CVE-2026-20706 is a token scope authorization bypass vulnerability (CWE-863: Incorrect Authorization) affecting Gitea, the open-source self-hosted Git server, in all versions up to and including 1.26.1. Due to an incomplete implementation of download token scope enforcement, the web archive download endpoint (/archive/*) was left unguarded, allowing access tokens with insufficient repository scopes to download full private repository archives. With a CVSS v3.1 base score of 9.1 (Critical) assigned by NVD, this vulnerability poses a severe risk to organizations hosting proprietary source code on publicly reachable Gitea instances.

Technical details

  • Root cause: Pull request #37698 added checkDownloadTokenScope enforcement to the /raw/*, /media/*, and attachment download endpoints in routers/web/repo/download.go, but the /archive/* endpoint — specifically repo.Download and repo.InitiateDownload in routers/web/repo/repo.go (line 372) — was omitted from this fix. The checkDownloadTokenScope function already existed in the same package but was simply never called for the archive route.
  • Trigger condition: Any request to the web archive download endpoint (/archive/*) using a token whose scope does not grant repository access (e.g., read:issue) will bypass the scope check and succeed, returning the full repository archive.
  • Attack vector: Network-accessible; exploitable against any Gitea instance reachable over HTTP/HTTPS. The vulnerability was discovered through variant analysis of PR #37698 by reviewing all web routes decorated with the webAuth.AllowOAuth2 middleware.
  • Impact: Unauthorized disclosure of full repository archives, including private source code. Confidentiality is directly compromised; repositories containing proprietary software, credentials, configuration data, or intellectual property are at risk of unauthorized exfiltration.
  • No public proof-of-concept has been identified for this specific CVE; however, exploitation requires only knowledge of the advisory and the ability to craft a web request to the unguarded /archive/* endpoint.

Affected software

  • Gitea Open Source Git Server, all versions up to and including 1.26.1
  • The API archive endpoint is separately scope-checked and is not affected; the bypass is specific to the web archive download path.

Severity

  • CVSS v3.1 Base Score: 9.1 (Critical)
  • CVSS v3.1 Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
  • CWE: CWE-863 – Incorrect Authorization

Mitigation and recommended actions

  • Immediate action: Upgrade to Gitea 1.26.2 or later, which contains the fix introduced in commit "CVE-2026-20706: fix: Add missed token scope checking (#37735)". Gitea has since also released versions 1.26.3 and 1.26.4, which address additional security issues; upgrading to the latest stable release is strongly recommended.
  • If immediate patching is not possible: Restrict network-level access to the Gitea instance so that the web archive download endpoint (/<user>/<repo>/archive/*) is not reachable from untrusted networks or the public internet. Rotate any access tokens that may have been used to access repositories outside their intended scope.

IONIX Status

The IONIX research team is tracking ongoing exploitation attempts and recommends immediate patching. Potentially affected assets are outlined in this post.

References

Are you exposed?

Get a free report of your organization’s exposure to this CVE and threat

How IONIX’s External Exposure Management Platform Detects and Validates
Zero-Days to Shrink MTTR

1

Map your entire attack surface (continously)

IONIX uses multi-factor discovery methods, including DNS analysis, certificate mapping, metadata inspection, and more, to automatically map every internet-facing asset across your environment. This includes cloud instances, third-party platforms, shadow IT, and even forgotten infrastructure that traditional tools miss.

2

Monitor for new CVEs

Dozens of threat intel feeds using agentic technology are continuously analyzed to detect the appearance of proof-of-concept code, exploit kits, and indicators of active targeting. IONIX goes further by applying AI to proactively evaluate whether emerging vulnerabilities are likely to be exploited, even before PoCs go public.

3

Identify Potential External Exposures

Not all CVEs matter. IONIX filters vulnerabilities by asking attacker-centric questions: Can it be reached from the internet? Does it require authentication? Is it being exploited in the wild? This dramatically reduces noise and focuses teams on threats that can actually be weaponized.

4

Create Safe, Scalable Exploit Validations

IONIX transforms real-world PoCs into safe, non-intrusive test payloads that can be run in production environments without disruption. These simulations are precisely targeted to the systems that are vulnerable, ensuring rapid validation without unnecessary load.

5

Execute Exploit Validations

By combining context about software stack, versioning, exposure status, and reachability, IONIX ensures that only the right payloads are executed against the right assets, maximizing efficiency and minimizing risk.

6

Drive Fast and Actionable Remediation

Results are routed through integrations with ticketing, SOAR, and SIEM tools. Issues are written in plain language, bundled into remediation clusters, and prioritized based on asset criticality, exploitability, and blast radius. This shortens mean time to remediation (MTTR) and empowers teams to act with confidence.

Are you exposed?

Get a free report of your organization’s exposure to this CVE and threat

Subscribe to Threat Center RSS

Copy/paste the link below into your preferred RSS reader or follow these instructions to subscribe to Slack alerts.

Get Real-Time CVE Alerts to Your Email

Be the first to know when new zero-days emerge