Gitea: Repository migration SSRF via multi-answer DNS allow-list bypass (CVE-2026-58442)
Gitea contains a server-side request forgery (SSRF) vulnerability in its repository migration URL validation logic. The validation incorrectly accepts hostnames that resolve to multiple IP addresses if any one IP is allowed, even if others are internal or blocked. This allows an authenticated low-privilege user to bypass restrictions and make Gitea connect to internal-only Git services, importing their contents into an attacker-controlled repository. The issue arises because the initial validation and the later git clone operation perform separate DNS resolutions, enabling an attacker-controlled hostname to resolve to an internal IP at clone time. This vulnerability affects Gitea versions prior to 1.27.0.
AI Analysis
Technical Summary
Gitea's repository migration URL validation can be bypassed when a hostname resolves to multiple IP addresses, some allowed and some blocked (e.g., loopback or private). The validation logic accepts the hostname if any resolved IP is allowed, but the actual git clone operation later resolves the hostname independently and may connect to an internal IP that should be blocked. This allows an authenticated user with repository migration permissions to perform SSRF by importing internal Git repositories into attacker-controlled repositories. The vulnerability is due to the mismatch between the allow/block list check and the DNS resolution performed during cloning.
Potential Impact
An authenticated user with permission to create repository migrations can exploit this SSRF vulnerability to make the Gitea server connect to internal network resources that are normally blocked. This can lead to unauthorized access and import of internal Git repository contents into attacker-controlled repositories. The vulnerability does not affect confidentiality, integrity, or availability of Gitea itself directly but exposes internal network resources to unauthorized access via the migration feature.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until a fix is available, restrict repository migration permissions to trusted users only and avoid enabling repository migration from untrusted sources. Monitor vendor channels for updates addressing this multi-answer DNS allow-list bypass issue.
Gitea: Repository migration SSRF via multi-answer DNS allow-list bypass (CVE-2026-58442)
Description
Gitea contains a server-side request forgery (SSRF) vulnerability in its repository migration URL validation logic. The validation incorrectly accepts hostnames that resolve to multiple IP addresses if any one IP is allowed, even if others are internal or blocked. This allows an authenticated low-privilege user to bypass restrictions and make Gitea connect to internal-only Git services, importing their contents into an attacker-controlled repository. The issue arises because the initial validation and the later git clone operation perform separate DNS resolutions, enabling an attacker-controlled hostname to resolve to an internal IP at clone time. This vulnerability affects Gitea versions prior to 1.27.0.
CVSS v3.1
Score 6.5medium
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
Gitea's repository migration URL validation can be bypassed when a hostname resolves to multiple IP addresses, some allowed and some blocked (e.g., loopback or private). The validation logic accepts the hostname if any resolved IP is allowed, but the actual git clone operation later resolves the hostname independently and may connect to an internal IP that should be blocked. This allows an authenticated user with repository migration permissions to perform SSRF by importing internal Git repositories into attacker-controlled repositories. The vulnerability is due to the mismatch between the allow/block list check and the DNS resolution performed during cloning.
Potential Impact
An authenticated user with permission to create repository migrations can exploit this SSRF vulnerability to make the Gitea server connect to internal network resources that are normally blocked. This can lead to unauthorized access and import of internal Git repository contents into attacker-controlled repositories. The vulnerability does not affect confidentiality, integrity, or availability of Gitea itself directly but exposes internal network resources to unauthorized access via the migration feature.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until a fix is available, restrict repository migration permissions to trusted users only and avoid enabling repository migration from untrusted sources. Monitor vendor channels for updates addressing this multi-answer DNS allow-list bypass issue.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- GHSA-h2x6-g7q6-344v
- Osv Schema Version
- 1.4.0
- Aliases
- ["CVE-2026-58442"]
- Ecosystems
- ["Go"]
- Database Specific Severity
- MODERATE
- Cvss Version
- 3.1
Threat ID: 6a600ab79c2644c7f8fe2500
Added to database: 07/22/2026, 00:11:35 UTC
Last enriched: 07/22/2026, 00:50:12 UTC
Last updated: 07/31/2026, 12:28:12 UTC
Views: 19
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.