Time-of-check Time-of-use (TOCTOU) Race Condition in Gitea - CVE-2026-58508
Published: July 14, 2026
Vulnerability details
The vulnerability allows a remote user to access internal network resources via server-side request forgery.
The vulnerability exists due to improper access control in services/migrations/migrate.go when processing migration URLs. A remote user can supply a URL that passes the initial DNS-based check and then rebind DNS resolution to access internal network resources via server-side request forgery.
Exploitation requires control over DNS responses for the target host and relies on rebinding between the validation step and the subsequent git fetch operation.