Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

Gitea: Repository migration SSRF via multi-answer DNS allow-list bypass (CVE-2026-58442)

0
Medium
Published: 07/21/2026 (07/21/2026, 20:37:45 UTC)
Source: GCVE Database
Product: code.gitea.io/gitea

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

Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
None
Availability
None
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N

Affected software

Goghsa
code.gitea.io/gitea
Affected versions
<1.27.0

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

AILast updated: 07/22/2026, 00:50:12 UTC

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.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

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 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

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

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses