Threat reportVulnerabilityTL-2026-0602

Gitea Container Registry Authorization Bypass (CVE-2026-27771) — Unauthenticated Pull of Private Container Images Across 31,000+ Self-Hosted Instances

highMONITORING

Gitea Container Registry Authorization Bypass (TL-2026-0602), also tracked as Gitea Container Registry Auth Bypass, is a high-severity software vulnerability, first published 2026-05-27. It has no confirmed attribution, affects Gitea Gitea, references 1 CVE (CVE-2026-27771), maps to 17 MITRE ATT&CK techniques (T1048, T1078, T1190), and is covered by 9 detection rules and 16 indicators of compromise.

Severity
HIGHAssessed severity
CVEs
1Referenced vulnerabilities
Techniques
17MITRE ATT&CK
Actors
0Not attributed
Detection rules
9SPL · KQL · Sigma
IOCs
16Indicators of compromise

Key facts for TL-2026-0602

Threat ID
TL-2026-0602
Also known as
Gitea Container Registry Auth Bypass, Noscope Gitea Disclosure
Severity
HIGH
Status
MONITORING
Category
VULNERABILITY
First published
Last reviewed
Attribution confidence
NONE
Motivation
UNKNOWN
Target sectors
healthcare, aerospace, industrial-manufacturing, retail, isp-telecom, software-development, social-media, saas-edtech, enterprise-cms
Target regions
China, United States, Germany, France, United Kingdom, Asia, Europe, North America
Detection rules
9
Indicators of compromise
16

Malware and tooling in Gitea Container Registry Authorization Bypass

Malware and tooling: docker / containerd / skopeo / oras / go-containerregistry

How Gitea Container Registry Authorization Bypass works

CVE-2026-27771 is a missing-authorization flaw in Gitea's package registry (also affecting the Forgejo fork) that allowed any unauthenticated remote user to pull container images and access package source metadata for repositories marked private or internal. Security firm Noscope identified ~31,750 likely-affected instances across 30+ countries spanning healthcare, aerospace, retail, ISPs, and SaaS, with two-thirds of exposure concentrated in China, the United States, and Germany. The vulnerable code path existed for roughly four years and was patched in Gitea 1.26.2 (released 2026-05-20); public disclosure followed on 2026-05-25.

Overview

CVE-2026-27771 is an improper-authorization (CWE-285 / CWE-862) vulnerability in the Gitea package registry subsystem that affects all Gitea releases prior to 1.26.2 and the upstream-derived Forgejo distribution. The flaw allows an unauthenticated remote attacker — with no Gitea account, API token, or registry credentials — to retrieve container images, Composer package source URLs, and other package metadata from repositories that operators explicitly marked private or internal. Because Gitea is a widely deployed self-hosted DevOps platform (a Gogs-derived alternative to GitHub Enterprise and GitLab Self-Managed), the issue exposes source code artifacts, build outputs, configuration baked into images, and any secrets accidentally embedded in private container layers (cloud credentials, API keys, internal CA material, signing keys, registry tokens).

Technical Root Cause

The root cause sits in the shared package-permission code path that Gitea's container registry, Composer registry, and other package-type handlers all build on top of. The patch commit (PR #37610, ''fix(packages): Add label for private and internal package and fix composor package source permission check'', credited to NoScope and implemented by Gitea maintainer @lunny) modifies routers/api/packages/composer/api.go so that createPackageMetadataResponse now invokes GetDoerRepoPermission against the package''s owning repository before populating Composer source URL fields in the response payload. Code reviewers on the PR explicitly flagged that the helper must use HasAnyUnitAccessOrPublicAccess rather than HasAnyUnitAccess to correctly handle repositories with public-unit-only configurations (where the repo is private but selected units are exposed). The PR also adds visibility badges across package list, detail, settings, and cleanup-preview templates so that operators can no longer be deceived by a UI that displays packages without indicating their private/internal scope.

The practical effect on the OCI surface is that an unauthenticated GET against /v2/{owner}/{image}/manifests/{tag} or /v2/{owner}/{image}/blobs/sha256:{digest} returned 200 for images attached to private repositories rather than the expected 401 Unauthorized or 404 Not Found. Noscope explicitly withheld exact endpoint paths and exploitation payloads from their public writeup; the technical attribution above is derived from the only commit linked to CVE-2026-27771 in the Gitea 1.26.2 changelog. Although Noscope frames the impact in container-registry terms, the fix landing in the Composer/packages permission code indicates that the missing access check is in shared package metadata logic that the container registry inherits — meaning a single authorization fix closes both surfaces.

Exploit Chain

There is no privilege escalation or persistence sequence required: the entire chain collapses into a single unauthenticated HTTP GET. (1) Reconnaissance — Internet-wide scanning via Shodan, Censys, or simple HTTP probes against Gitea''s default port (3000) or HTTPS variants on 80/443 enumerates candidate instances; the Gitea UI banner and /api/v1/version endpoint readily fingerprint Gitea and Forgejo. (2) Target enumeration — The attacker queries /api/v1/repos/search and /api/v1/users/search to identify owners and repositories, then probes /api/packages/{owner}/{type}/{name} to enumerate package names attached to private repositories. (3) Manifest pull — An OCI client (docker pull, skopeo copy, oras pull, or raw curl against /v2/) requests the manifest for the target image; under the vulnerable code path the registry returns the manifest without an authorization check. (4) Blob retrieval — Each layer digest from the manifest is fetched via /v2/{owner}/{image}/blobs/sha256:{digest}; the attacker can reconstruct the entire image, including filesystem contents and environment-variable-baked secrets. (5) Secondary impact — Extracted images frequently contain build-time credentials, .env files, cloud SDK profiles, and private signing material, providing a pivot into the victim''s cloud, CI/CD, and code-signing infrastructure.

PoC and Exploitation Status

No public proof-of-concept code has been released. Noscope explicitly chose not to publish exploitation details or the exact endpoint paths and confirms they did not retrieve third-party private image content during their research. However, exploitation complexity is trivially low (no auth, no account, single unauthenticated GET against well-known OCI distribution endpoints), and the fix commit is public on GitHub — defenders should assume opportunistic scanning began on 2026-05-25 and treat the threat as POC_PUBLIC-equivalent.

Exposure Scale (Noscope research)

Noscope enumerated 34,144 internet-reachable Gitea hosts via Shodan and validated the issue against a 100-host sample, finding ~93 percent returned responses consistent with the bypass — yielding an estimated 31,750 likely-affected instances. Two-thirds of exposed infrastructure sits in China, the United States, and Germany, with France and the United Kingdom also heavily represented and 30+ countries in total. Fifty-two percent of affected hosts run on major cloud or VPS providers, and 68 percent listen on Gitea''s default port. A targeted 10-host inspection identified affected organizations across healthcare providers, aerospace and industrial manufacturing, retail infrastructure, ISPs, software development shops, social media platforms, enterprise CMS deployments, and SaaS/EdTech vendors.

Detection Surface

Defenders should watch for unauthenticated HTTP GETs returning HTTP 200 against /v2/{owner}/{image}/manifests/* and /v2/{owner}/{image}/blobs/sha256:* for repositories that were configured private, bursts of /api/packages/{owner}/composer/p2/*.json requests from unauthenticated sources after 2026-05-25, and generic OCI client user-agents (docker/, containerd/, skopeo/, oras/, go-containerregistry/) hitting private package paths without Authorization headers. Reverse-proxy access logs are typically the highest-fidelity source.

Remediation

Upgrade Gitea to 1.26.2 or later immediately. Forgejo operators should track upstream patch backport at codeberg.org/forgejo/security-announcements. If patching cannot be deployed in the immediate window, set [service].REQUIRE_SIGNIN_VIEW=true in app.ini — this forces authentication for all content access and mitigates the CVE at the cost of breaking intentionally-public repositories. As defense-in-depth, restrict /v2/ and /api/packages/ endpoints via reverse-proxy ACL or WAF rules until the upgrade lands, audit unauthenticated GETs against those paths in retained access logs, and rotate any secrets that may have been baked into container images intended to be private (cloud credentials, signing keys, registry tokens, internal API keys).

Forks and Derivatives

Forgejo is confirmed affected by Noscope through independent testing (it shares Gitea''s package registry implementation). Other Gitea forks should be treated as affected until each vendor publishes an explicit advisory. Self-built or vendored Gitea instances must apply the Gitea 1.26.2 patches (commit set referenced by PR #37610) before being considered remediated.

MITRE ATT&CK techniques used in TL-2026-0602

Exfiltration

T1048 Exfiltration Over Alternative Protocol; T1567 Exfiltration Over Web Service

Initial Access

T1078 Valid Accounts; T1190 Exploit Public-Facing Application

Collection

T1213 Data from Information Repositories; T1213.003 Data from Information Repositories: Code Repositories

Discovery

T1526 Cloud Service Discovery; T1613 Container and Resource Discovery

Credential Access

T1552 Unsecured Credentials; T1552.001 Unsecured Credentials: Credentials In Files; T1552.005 Unsecured Credentials: Cloud Instance Metadata API; T1552.007 Unsecured Credentials: Container API

Reconnaissance

T1592 Gather Victim Host Information; T1595 Active Scanning; T1595.002 Active Scanning: Vulnerability Scanning; T1596 Search Open Technical Databases; T1596.005 Search Open Technical Databases: Scan Databases

Affected products and versions in Gitea Container Registry Authorization Bypass

  • Gitea — Gitea
    Vulnerable versions: < 1.26.2 (all releases since the package registry was introduced ~2022)
    Fixed in: 1.26.2; 1.26.3+
  • Forgejo — Forgejo
    Vulnerable versions: all versions sharing the upstream Gitea package registry code path prior to backport
    Fixed in: awaiting Forgejo security-announcements advisory and backport release

Remediation for Gitea Container Registry Authorization Bypass

Patches

  • Gitea 1.26.2 — released 2026-05-20, fixes CVE-2026-27771 via PR #37610 (https://github.com/go-gitea/gitea/pull/37610).
  • Forgejo — apply upstream patch backport when published; track codeberg.org/forgejo/security-announcements/issues for advisory ID.

Immediate actions

  • Upgrade Gitea to 1.26.2 or later (release 2026-05-20) on every internet-reachable and internal Gitea instance.
  • If immediate upgrade is not possible, set [service].REQUIRE_SIGNIN_VIEW=true in app.ini and restart Gitea — this forces authentication for all content access and mitigates the bypass but breaks intentionally-public repos.
  • Place /v2/ and /api/packages/ behind a reverse proxy ACL or WAF rule that requires an Authorization header until the upgrade is deployed.
  • Audit reverse-proxy and Gitea access logs for unauthenticated 200 OK responses against /v2/*/manifests/* and /v2/*/blobs/sha256:* dating back to before 2026-05-25.

Workarounds

  • Set REQUIRE_SIGNIN_VIEW=true under [service] in app.ini to force authentication for all content access (breaks public repositories).
  • Block unauthenticated requests to /v2/ and /api/packages/ at the reverse proxy / WAF tier until 1.26.2 is deployed.
  • Temporarily mark sensitive container packages as deleted or move them to a private mirror that requires registry credentials, then restore after upgrade.

Longer-term hardening

  • Rotate any secrets that may have been embedded in private container images: cloud SDK credentials, API tokens, signing keys, registry tokens, internal CA material, .env contents.
  • Adopt a pre-push secret scanner (gitleaks, trufflehog, syft+grype with secret rules) so future container images do not embed plaintext credentials regardless of registry ACLs.
  • Place self-hosted DevOps platforms (Gitea, Forgejo, Gitlab CE, Drone, Woodpecker) behind an authenticated reverse proxy or VPN rather than direct internet exposure.
  • Implement scheduled secret rotation for build-time credentials baked into images, and migrate to short-lived OIDC/workload identity tokens where the registry consumer is in cloud CI/CD.
  • Track Gitea security advisories at github.com/go-gitea/gitea/security/advisories and Forgejo security announcements at codeberg.org/forgejo/security-announcements.

CVEs associated with Gitea Container Registry Authorization Bypass

CVE-2026-27771

Weaknesses (CWE) in Gitea Container Registry Authorization Bypass

CWE-285, CWE-862, CWE-200

Timeline of Gitea Container Registry Authorization Bypass

  • Vulnerable package permission code path is introduced in Gitea (~four-year window prior to discovery per Noscope research).
  • Security firm Noscope identifies CVE-2026-27771 during an audit of the Gitea package registry.
  • Noscope validates the bypass against a 100-host Shodan sample, observing ~93 percent of probed instances responding consistent with the issue; extrapolates 31,750 affected deployments.
  • Noscope reports the vulnerability to the Gitea security team and a CVE identifier (CVE-2026-27771) is reserved.
  • Gitea 1.26.2 is released at 18:51 UTC containing PR #37610 (''fix(packages): Add label for private and internal package and fix composor package source permission check''), crediting NoScope.
  • Noscope publishes its research blog and The Hacker News carries the disclosure; exposure data (30+ countries, 31,750 instances, two-thirds in CN/US/DE) becomes public.
  • Threadlinqs Intelligence opens TL-2026-0602 for full analysis, detection authoring, and exposure correlation against BeaconBeagle and customer asset inventories.
  • As of 2026-05-29, CVE-2026-27771 (Gitea/Forgejo container registry auth bypass) is patched in Gitea 1.26.2 with no confirmed in-the-wild exploitation, public PoC, or CISA KEV listing. It stays a live concern: ~31,750 exposed instances, trivial single-GET exploitation, public fix commit, and a still-pending Forgejo backport invite opportunistic scanning.

Sources cited for Gitea Container Registry Authorization Bypass

Detection coverage for TL-2026-0602

As of 2026-05-27, Threadlinqs Intelligence publishes 9 detection rule(s) for TL-2026-0602 across Splunk SPL, Microsoft KQL and Sigma, covering 16 indicator(s) of compromise. The whole corpus is readable without an account; a free account unlocks full detection query text in Splunk SPL, Microsoft KQL and Sigma; paid tiers add raw indicator values, correlation and the MCP server. Threadlinqs MCP server · View plans.

9 detection rules (Splunk SPL, Microsoft KQL, Sigma) · Blue and above. Compare plans
16 indicators of compromise · Red and above. Compare plans

Threadlinqs Intelligence — Real-Time Threat Detection Platform

[ 0 threats ] [ 0 det ] [ CRIT: 0 ] [ HIGH: 0 ]
// threat_feed
$ sort --newest
Showing all threats

Live intelligence console

Threat level
Fig. 01 · Threat weatherIndexing the archive…
1 square = 1 threat · click to open

Latest Threats