{"id":"EUVD-2026-58164","revision":null,"records":[{"revision":"37f6cf0ed3e8414ea78e7e4ee0adb06b","observedAt":"2026-10-23T15:48:27.903+00:00","statement":{"source":"cve-program","id":"CVE-2026-58437","aliases":[],"title":"Repository Visibility Manipulation via Git Push Options","description":"Repository Visibility Manipulation via Git Push Options","state":0,"publishedAt":"2026-08-13T16:44:52.661+00:00","modifiedAt":"2026-08-14T19:12:37.154+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-8p9h-49rc-qgxj","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-58437","license":"CVE Program Terms of Use","key":"cve-program:CVE-2026-58437","identifiers":["CVE-2026-58437"]},"retained":false,"historicalAffected":[]},{"revision":"3ef8a35b4bbd4f148700ab1fc7b59c97","observedAt":"2026-11-19T17:49:27.808+00:00","statement":{"source":"euvd","id":"EUVD-2026-58164","aliases":["CVE-2026-58437","GHSA-8p9h-49rc-qgxj"],"title":"Repository Visibility Manipulation via Git Push Options","description":"Repository Visibility Manipulation via Git Push Options","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:L/I:H/A:N","score":7.1,"severity":null}],"references":["https://github.com/go-gitea/gitea/security/advisories/GHSA-8p9h-49rc-qgxj","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-58164","license":"ENISA EUVD · source terms and attribution apply","enrichment":{"sourceStatus":null,"weaknesses":[],"productCriteria":[],"sourceDates":{"datePublished":"Aug 13, 2026, 4:44:52 PM","dateUpdated":"Aug 14, 2026, 7:12:37 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-58164","identifiers":["EUVD-2026-58164","CVE-2026-58437","GHSA-8p9h-49rc-qgxj"]},"retained":false,"historicalAffected":[]},{"revision":"426e311352dd4934ac8195f6361ee3ae","observedAt":"2026-10-25T14:19:16.843+00:00","statement":{"source":"nvd","id":"CVE-2026-58437","aliases":[],"title":"Repository Visibility Manipulation via Git Push Options","description":"Repository Visibility Manipulation via Git Push Options","state":0,"publishedAt":"2026-08-13T17:17:27.703+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:L/I:H/A:N","score":7.1,"severity":"HIGH"}],"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-8p9h-49rc-qgxj"],"sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2026-58437","license":"NIST NVD usage terms; underlying source attribution retained","enrichment":{"sourceStatus":"Deferred","weaknesses":["CWE-284"],"productCriteria":[],"sourceDates":{"published":"2026-08-13T17:17:27.703","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-58437","identifiers":["CVE-2026-58437"]},"retained":false,"historicalAffected":[]},{"revision":"b9c855c83252420d947bfe518fefba89","observedAt":"2026-10-24T13:19:41.952+00:00","statement":{"source":"osv","id":"GHSA-8p9h-49rc-qgxj","aliases":["CVE-2026-58437","GO-2026-6047"],"title":"Gitea: Repository Visibility Manipulation via Git Push Options","description":"### Repository Visibility Manipulation via Git Push Options\n\n| Field | Value |\n|-------|-------|\n| **Affected File** | `routers/private/hook_post_receive.go` |\n| **Affected Function** | `HookPostReceive()` |\n| **Affected Lines** | 173–225 |\n| **Prerequisite** | Attacker must have owner-level or admin collaborator access to the target repository |\n\n---\n\n#### Description\n\nGitea's post-receive git hook handler processes git push options — key-value pairs transmitted by a client during `git push` using the `-o` flag. Two undocumented push options, `repo.private` and `repo.template`, allow any user with repository owner or admin-collaborator access to toggle the visibility (`private/public`) and template status of a repository as a side effect of a normal git push.\n\nThis capability was originally intended solely for the \"push-to-create\" feature (automatically creating a repo on first push). However, the options are processed without restriction on already-existing repositories, and — critically — the visibility change bypasses every control that a proper settings change would trigger:\n\n- No entry written to the repository's audit/activity log\n- No webhook event fired (`repository` event with `visibility_changed` action)\n- No org-level notification to owners\n- No team permission re-calculation\n- No email alert to watchers\n- The database update uses `UpdateRepositoryColsNoAutoTime`, which also suppresses the `updated_at` timestamp change\n\n\n---\n\n#### Vulnerable Code\n\n**`routers/private/hook_post_receive.go:173–225`**\n\n```go\nisPrivate  := opts.GitPushOptions.Bool(private.GitPushOptionRepoPrivate)  // \"repo.private\"\nisTemplate := opts.GitPushOptions.Bool(private.GitPushOptionRepoTemplate) // \"repo.template\"\n\nif isPrivate.Has() || isTemplate.Has() {\n    // ... loads repo and verifies pusher is owner or admin ...\n    if !perm.IsOwner() && !perm.IsAdmin() {\n        ctx.JSON(http.StatusNotFound, ...)\n        return\n    }\n\n    // FIXME: these options are not quite right, for example: changing visibility\n    //        should do more works than just setting the is_private flag\n    // These options should only be used for \"push-to-create\"\n    if isPrivate.Has() && repo.IsPrivate != isPrivate.Value() {\n        // TODO: it needs to do more work\n        repo.IsPrivate = isPrivate.Value()\n        repo_model.UpdateRepositoryColsNoAutoTime(ctx, repo, \"is_private\")\n        //         ^^^ bypasses updated_at timestamp, audit trail suppressed\n    }\n    if isTemplate.Has() && repo.IsTemplate != isTemplate.Value() {\n        repo.IsTemplate = isTemplate.Value()\n        repo_model.UpdateRepositoryColsNoAutoTime(ctx, repo, \"is_template\")\n    }\n}\n```\n\nThe push option constants are defined in `modules/private/pushoptions.go:18–19`:\n\n```go\nGitPushOptionRepoPrivate  = \"repo.private\"\nGitPushOptionRepoTemplate = \"repo.template\"\n```\n\n---\n\n#### Attack Scenario\n\n**Scenario A — Insider threat / rogue admin collaborator**\n\nAn organization grants a contractor repo admin access to contribute to a private repository containing proprietary source code. The contractor, before their access is revoked, makes a private repo public for several minutes — long enough to clone, archive, or index the content — then makes it private again. The action leaves no audit trail distinguishable from a normal git push.\n\n**Scenario B — Supply-chain template poisoning**\n\nA repository marked as a template is used by CI/CD pipelines to generate new project repositories. An admin collaborator uses `repo.template=false` to silently remove the template designation, then makes changes to the repo's content, re-marks it as a template with `repo.template=true`, and waits for downstream consumers to regenerate projects from the now-backdoored template. The `updated_at` timestamp is unchanged due to `UpdateRepositoryColsNoAutoTime`, making diff-detection harder.\n\n---\n\n#### Step-by-Step Reproduction\n\n**Prerequisites:**\n- A Gitea user account with either owner or admin-collaborator access to a private repository\n- `git` client with push access to the repository\n\n---\n\n**Step 1 — Confirm the target repository is private**\n\n---\n\n**Step 2 — Clone the repository**\n\n```bash\ngit clone http://USER:PASSWORD@<gitea-host>/OWNER/REPO.git /tmp/target-repo\ncd /tmp/target-repo\n```\n\n---\n\n**Step 3 — Make any commit** *(the push option rides on a real push)*\n\n```bash\necho \"$(date)\" >> .gitkeep\ngit add .gitkeep\ngit commit -m \"routine update\"\n```\n\n---\n\n**Step 4 — Execute the exploit push**\n\n```bash\n# Make the repository public\ngit push http://USER:PASSWORD@<gitea-host>/OWNER/REPO.git main \\\n  -o repo.private=false\n\n# The push completes with a normal success message:\n#   remote: Processed 1 references in total\n#   To http://<gitea-host>/OWNER/REPO.git\n#      abc1234..def5678  main -> main\n```\n\n---\n\n**Step 5 — Verify the repository is now public**\n\n\n---\n\n**Step 6 — Restore and cover tracks**\n\nRe-make it private in the same session, leaving no visible audit trail\n\nThe repository activity feed shows only two normal push events. The visibility change is invisible.\n\n**Verification: confirm no activity log entry**\n\n\n---\n\n#### Impact Details\n\n| Impact | Description |\n|--------|-------------|\n| **Data exfiltration** | Private source code, CI/CD secrets in plain-text files, environment configs become publicly cloneable for the window the repo is public |\n| **No audit trail** | `UpdateRepositoryColsNoAutoTime` suppresses the `updated_at` change; no activity log entry; no webhook; no notification |\n| **Supply chain** | Combined with `repo.template=true/false`, an attacker can silently rotate repository template status, affecting all downstream repositories that generate from this template |\n| **Scope** | Affects all repos where the attacker has admin-collaborator access — not only repos they own |\n\n---\n\n#### Recommended Fix\n\n**Option 1 (preferred) — Remove the options from post-receive hook entirely.** The `repo.private` and `repo.template` push options were designed for the push-to-create flow and have no legitimate use on existing repositories. They should be gated with:\n\n```go\n// routers/private/hook_post_receive.go\nif isPrivate.Has() || isTemplate.Has() {\n    if !wasEmpty {\n        // repo already existed — refuse these options on established repos\n        log.Warn(\"Repo push options repo.private/repo.template ignored for existing repo %s\", repoName)\n        // do not process\n    } else {\n        // original push-to-create path only\n        ...\n    }\n}\n```\n\n**Option 2 — Route through the full visibility-change service** so that audit events, webhooks, and team re-syncs are triggered:\n\n```go\n// Instead of the raw UpdateRepositoryColsNoAutoTime call:\nif err := repo_service.UpdateRepositoryVisibility(ctx, repo, isPrivate.Value()); err != nil {\n    ...\n}\n```\n\nWhere `UpdateRepositoryVisibility` fires the `repository` webhook event and writes an activity log entry.","state":0,"publishedAt":"2026-07-21T21:02:44+00:00","modifiedAt":"2026-07-22T21:11:47.0750172+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:L/I:H/A:N","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"HIGH"}],"references":["https://github.com/go-gitea/gitea/security/advisories/GHSA-8p9h-49rc-qgxj","https://github.com/go-gitea/gitea","https://github.com/go-gitea/gitea/releases/tag/v1.27.0"],"sourceUrl":"https://github.com/advisories/GHSA-8p9h-49rc-qgxj","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-8p9h-49rc-qgxj","identifiers":["GHSA-8p9h-49rc-qgxj","CVE-2026-58437","GO-2026-6047"]},"retained":false,"historicalAffected":[]},{"revision":"f88d87b3346743b288acd28ecdfbaec6","observedAt":"2026-10-24T13:19:41.952+00:00","statement":{"source":"osv","id":"GO-2026-6047","aliases":["CVE-2026-58437","GHSA-8p9h-49rc-qgxj"],"title":"Gitea: Repository Visibility Manipulation via Git Push Options in gitea.dev","description":"Gitea: Repository Visibility Manipulation via Git Push Options in gitea.dev","state":0,"publishedAt":"2026-07-22T20:36:35+00:00","modifiedAt":"2026-07-22T21:00:27.1992511+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-8p9h-49rc-qgxj","https://github.com/go-gitea/gitea/releases/tag/v1.27.0"],"sourceUrl":"https://osv.dev/vulnerability/GO-2026-6047","license":"OSV · upstream source license applies","key":"osv:GO-2026-6047","identifiers":["GO-2026-6047","CVE-2026-58437","GHSA-8p9h-49rc-qgxj"]},"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-20T20:49:20.9168713+00:00","complete":true,"records":1790,"lastAttemptAt":"2026-11-20T20:49:20.9168713+00:00","lastSuccessAt":"2026-11-20T20:49:21.0946657+00:00","error":null,"lastVerifiedAt":"2026-11-20T20:49:21.0946664+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-9b1bfd2a0627b3226900cd683637c8c8c101165df8c39d80d883399de44be192","complete":true,"records":429965,"lastAttemptAt":"2026-11-20T20:46:09.1101121+00:00","lastSuccessAt":"2026-11-20T20:46:08.8667239+00:00","error":null,"lastVerifiedAt":"2026-11-20T20:46:09.1101121+00:00","snapshotPublishedAt":"2026-11-20T20:29:35+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-31fd60ee29374a90b50d4033c9e51ed3","complete":false,"records":13914,"lastAttemptAt":"2026-11-20T20:50:01.382463+00:00","lastSuccessAt":"2026-11-20T20:50:01.377+00:00","error":"68 identifier lookups failed; latest failures include AccessDenied (HTTP 403). Other identifiers were checked independently.","lastVerifiedAt":"2026-11-20T20:50:01.377+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13894,"expectedIdentifiers":13962,"failedIdentifiers":68},{"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-20T20:49:20.9168713+00:00","complete":true,"records":1131,"lastAttemptAt":"2026-11-20T20:49:20.9168713+00:00","lastSuccessAt":"2026-11-20T20:49:21.0956264+00:00","error":null,"lastVerifiedAt":"2026-11-20T20:49:21.0956268+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-1053c94b54b943e38685372043835f76","complete":false,"records":13926,"lastAttemptAt":"2026-11-20T20:50:00.3568142+00:00","lastSuccessAt":"2026-11-20T20:50:00.351+00:00","error":null,"lastVerifiedAt":"2026-11-20T20:50:00.351+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13951,"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-20T20:49:20.7778704+00:00","lastSuccessAt":"2026-11-20T15:48:09.8429817+00:00","error":null,"lastVerifiedAt":"2026-11-20T20:49:20.7778704+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-20T20:46:09.1908922+00:00","lastSuccessAt":"2026-11-20T15:46:15.4249619+00:00","error":null,"lastVerifiedAt":"2026-11-20T20:46:09.1908922+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-20T20:49:20.8828255+00:00","lastSuccessAt":"2026-11-20T18:47:57.1855043+00:00","error":null,"lastVerifiedAt":"2026-11-20T20:49:20.8828255+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-45828ad2ad9e353fd72d684bc163830757c3d2c66dff75acee313523d747b3d0","complete":true,"records":232840,"lastAttemptAt":"2026-11-20T20:49:20.6502152+00:00","lastSuccessAt":"2026-11-20T20:49:18.6460238+00:00","error":null,"lastVerifiedAt":"2026-11-20T20:49:20.6502152+00:00","snapshotPublishedAt":"2026-11-20T20:33:37+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null}]}