Skip to main content
Vulnerability Database/CVE-2026-101027

CVE-2026-101027: Gitea DNS Rebinding Auth Bypass Vulnerability

CVE-2026-101027 is a DNS rebinding authentication bypass in Gitea that allows attackers to bypass local-network restrictions through controlled DNS resolution. This post explains its impact, affected versions, and mitigation steps.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2026-101027 Overview

CVE-2026-101027 is a Server-Side Request Forgery (SSRF) vulnerability in Gitea's repository migration feature. When administrators configure [migrations] ALLOWED_DOMAINS, Gitea accepts any hostname matching the allow list without re-checking its resolved IP address against local-network restrictions. An authenticated user who can start repository migrations and control DNS for an allowed hostname can resolve it to loopback or RFC1918 addresses. This bypasses the ALLOW_LOCALNETWORKS = false safeguard and allows the Gitea server to reach internal services. Instances without ALLOWED_DOMAINS configured are not affected by this bypass.

Critical Impact

Authenticated attackers can pivot through the Gitea server to query internal services, cloud metadata endpoints, and other systems that should be unreachable from external users.

Affected Products

  • Gitea versions prior to v28.0.0
  • Gitea instances with [migrations] ALLOWED_DOMAINS explicitly configured
  • Gitea instances relying on ALLOW_LOCALNETWORKS = false as an isolation control

Discovery Timeline

  • 2026-10-06 - CVE-2026-101027 published to NVD
  • 2026-10-07 - Last updated in NVD database

Technical Details for CVE-2026-101027

Vulnerability Analysis

Gitea's migration subsystem fetches remote repositories over HTTP(S), SSH, or Git protocols. To prevent SSRF, administrators can set ALLOW_LOCALNETWORKS = false, which blocks requests to loopback and private address ranges. The ALLOWED_DOMAINS option provides an allow list of hostnames that migrations may target.

The vulnerability stems from how these two controls interact. When a migration request matches an entry in ALLOWED_DOMAINS, Gitea treats the hostname as trusted and skips the local-network address check. Hostname matching happens before DNS resolution, so the enforced policy never inspects the actual destination IP.

A user who controls DNS for an allow-listed hostname can point it at 127.0.0.1, 169.254.169.254, or any internal RFC1918 address. The migration worker then issues outbound requests from the Gitea host to those addresses. Impact is scoped to confidentiality: an attacker can enumerate internal HTTP services, cloud instance metadata, and admin interfaces reachable from the server.

Root Cause

The allow-list check short-circuits the local-network validation. ALLOWED_DOMAINS acts as an override rather than an additional filter applied on top of the IP-based restriction. The resolved address is never cross-checked against the local-network deny policy.

Attack Vector

An authenticated user starts a repository migration pointing at a hostname they control that matches the configured ALLOWED_DOMAINS pattern. The attacker configures that hostname's DNS A record to return an internal IP address such as 127.0.0.1 or a cloud metadata endpoint. Gitea resolves the hostname, bypasses the local-network check, and issues the migration request to the internal target. Responses can be returned through migration status messages, logs, or imported repository content.

See the GitHub Security Advisory GHSA-fqjr-23c8-gg9m for additional technical context.

Detect Identity Attacks the Moment Authentication Fails

Singularity™ Identity surfaces credential misuse, lateral movement, and privilege escalation in real time, so you can contain the breach before it spreads.

Stop Identity Attacks

Detection Methods for CVE-2026-101027

Indicators of Compromise

  • Repository migration jobs targeting hostnames whose DNS resolves to 127.0.0.0/8, 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16, or 169.254.169.254
  • Outbound HTTP connections from the Gitea process to internal subnets or cloud metadata endpoints during migration operations
  • Migration audit log entries referencing hostnames defined in ALLOWED_DOMAINS but originating from untrusted user accounts

Detection Strategies

  • Correlate Gitea application logs with network flow data to flag migrations whose destination IP falls inside internal address space
  • Alert when the Gitea service process initiates connections to 169.254.169.254 or other cloud metadata IPs
  • Review ALLOWED_DOMAINS configuration and identify hostnames whose authoritative DNS is operated outside the organization

Monitoring Recommendations

  • Forward Gitea migration logs and host network telemetry to a central analytics platform for correlation
  • Baseline normal migration destinations and alert on first-seen internal IPs as migration targets
  • Monitor for repeated failed migrations against uncommon ports on internal hosts, which can indicate internal port scanning

How to Mitigate CVE-2026-101027

Immediate Actions Required

  • Upgrade Gitea to v28.0.0 or later, which enforces local-network checks after DNS resolution even for allow-listed domains
  • Audit ALLOWED_DOMAINS entries and remove any hostnames not under organizational control
  • Restrict who can start repository migrations by tightening user permissions and disabling self-service migration where feasible

Patch Information

The fix is delivered in Gitea v28.0.0. The code change validates the resolved IP address against the local-network restriction regardless of whether the hostname matches ALLOWED_DOMAINS. See Pull Request #39426 and the Gitea 28.0.0 release announcement for details.

Workarounds

  • Temporarily unset [migrations] ALLOWED_DOMAINS so that the standard ALLOW_LOCALNETWORKS = false enforcement path applies
  • Place the Gitea server in a network segment that cannot reach sensitive internal services or cloud metadata endpoints
  • Use an egress proxy that enforces IP-based allow listing for outbound migration traffic
bash
# Example hardening in app.ini until upgrade is possible
[migrations]
ALLOW_LOCALNETWORKS = false
# Remove or tightly scope ALLOWED_DOMAINS to vendor-controlled hosts
# ALLOWED_DOMAINS =

[service]
DISABLE_MIGRATIONS = true

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.