{"vuln_id":"CVE-2026-73294","aliases":["GHSA-xp7j-h7jc-4w8p"],"description":"Semaphore U: OS Command Injection","published_at":"2026-09-08T17:57:44Z","modified_at":"2026-11-17T07:10:43.612648Z","first_seen_at":"2026-11-21T19:15:56.733298Z","severity":"critical","severity_source":"native","cvss_score":9.9,"cvss_vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H","cwe":["CWE-78","CWE-88"],"vendor":null,"product":null,"kev":{"is_kev":false,"date_added":null,"due_date":null,"ransomware":false},"epss":0.0065,"epss_percentile":0.52096,"nvd_status":null,"enriched_at":null,"links":{"nvd":"https://nvd.nist.gov/vuln/detail/CVE-2026-73294"},"matched_alias":null,"items":[{"id":10991,"source":{"id":"osv","name":"OSV.dev"},"title":"GO-2026-6435: Semaphore U: OS Command Injection in github.com/semaphoreui/semaphore","summary":"Semaphore U: OS Command Injection in github.com/semaphoreui/semaphore\n\nAffected: Go:github.com/semaphoreui/semaphore\n\nFixed in: 0.0.0-20260704181911-7e8a9434bd81\n\nReferences:\nhttps://github.com/semaphoreui/semaphore/security/advisories/GHSA-xp7j-h7jc-4w8p\nhttps://nvd.nist.gov/vuln/detail/CVE-2026-73294\nhttps://github.com/semaphoreui/semaphore/commit/7e8a9434bd81b82cf42220151c74801ea97542d6\nhttps://github.com/semaphoreui/semaphore/commit/a7a7a33a64aea382a0726b3722856f298663eacf\nhttps://github.com/semaphoreui/semaphore/tree/v2.18.17\nhttps://github.com/semaphoreui/semaphore/tree/v2.19.5-beta2","url":"https://osv.dev/vulnerability/GO-2026-6435","published_at":"2026-09-10T14:48:42Z","updated_at":"2026-11-17T07:10:43.612648Z","fetched_at":"2026-11-21T19:15:55.946354Z","severity":"critical","cvss_score":9.9,"epss":0.0065,"is_kev":false,"has_exploit":false,"kev_due_date":null,"vendor":null,"product":"github.com/semaphoreui/semaphore","vuln_id":"CVE-2026-73294","vuln_ids":["CVE-2026-73294","GHSA-XP7J-H7JC-4W8P","GO-2026-6435"],"tags":["osv","go","fix-available"],"cluster_id":10762,"links":{"self":"https://vulnwatch.ve1ve2.com/api/v1/items/10991","html":"https://vulnwatch.ve1ve2.com/item/10991"}},{"id":10990,"source":{"id":"osv","name":"OSV.dev"},"title":"GHSA-xp7j-h7jc-4w8p: Semaphore U: OS Command Injection","summary":"Semaphore U: OS Command Injection\n\n# Summary\nAn OS command injection in repository git_url handling lets any user holding the Manager or Owner role on any project (the normal project-collaborator roles) achieve remote code execution on the Semaphore server host. Using git's --upload-pack=\noption, an attacker runs arbitrary commands. The command executes inside the main Semaphore server process (via the schedule commit-hash poller), so it runs even when jobs are configured for remote runners — bypassing runner isolation and exposing the master encryption key and every project's secrets. Reproducible on a default install (git_client: cmd_git); no non-default configuration is required.\n\n# Details\nThe repository git_url is attacker-controlled (HTTP body) and reaches exec.Command(\"git\", ...) unvalidated. Two missing controls cause this:\n\n1. git_url is never validated against option injection.\nRepository.Validate() (db/Repository.go, ~lines 138–156) validates the branch via ValidateGitBranch (db/git_branch.go, which rejects a leading -), but performs no equivalent check on GitURL (only \"non-empty\"). ValidateRepository (db/Store.go, ~802–806) only checks the SSH key. CreateRepository (db/sql/repository.go, ~76–95) stores it verbatim. Because --upload-pack=... has no scheme:// and no leading /, GetType() (db/Repository.go, ~113–136) classifies it as RepositorySSH and GetGitURL(false) (~72–111) returns it raw/unchanged.\n\n2. The git command is built with no -- separator.\nCmdGitClient.GetLastRemoteCommitHash (db_lib/CmdGitClient.go, ~169–185) calls:\nc.output(r, GitRepositoryTmpPath, \"ls-remote\",\nr.Repository.GetGitURL(false), // attacker-controlled\nr.Repository.GitBranch) // \"master\"\noutput (~79–93) → makeCmd (~21–60): exec.Command(\"git\") (line ~27), cmd.Args = append(cmd.Args, args...) (line ~55). The resulting argv has no --:\n[\"git\", \"ls-remote\", \"--upload-pack=\n;true\", \"master\"]\ngit parses --upload-pack=... as an option; master becomes the (local-transport) repository operand; git then executes the upload-pack value through a shell (sh -c \"\n'master'\"), running\n. This is intended git behavior — the fault is Semaphore passing untrusted data as argv. (The command runs even though git subsequently prints fatal: Could not read from remote repository and exits 128, and even though master is not a real path.)\n\n### Trigger — it fires in the server process.\nA project schedule with a repository_id causes the scheduler to run git ls-remote to check for new commits. AddSchedule (api/projects/schedules.go, ~130–160; validateSchedulePayload ~86–118 validates only the cron format — it does not require the repo to be tied to the template). The schedule pool is started in the server process: runService in cli/cmd/root.go (CreateSchedulePool ~line 115, go schedulePool.Run() ~line 193), independent of remote-runner config. On each tick, ScheduleRunner.Run (services/schedules/SchedulePool.go, ~96–193, line ~117) calls tryUpdateScheduleCommitHash (~61–94) —\n\nAffected: Go:github.com/semaphoreui/semaphore\n\nFixed in: 0.0.0-20260704181911-7e8a9434bd81\n\nReferences:\nhttps://github.com/semaphoreui/semaphore/security/advisories/GHSA-xp7j-h7jc-4w8p\nhttps://nvd.nist.gov/vuln/detail/CVE-2026-73294\nhttps://github.com/semaphoreui/semaphore/commit/7e8a9434bd81b82cf42220151c74801ea97542d6\nhttps://github.com/semaphoreui/semaphore/commit/a7a7a33a64aea382a0726b3722856f298663eacf\nhttps://github.com/semaphoreui/semaphore\nhttps://github.com/semaphoreui/semaphore/tree/v2.18.17\nhttps://github.com/semaphoreui/semaphore/tree/v2.19.5-beta2","url":"https://osv.dev/vulnerability/GHSA-xp7j-h7jc-4w8p","published_at":"2026-09-08T17:57:44Z","updated_at":"2026-11-17T07:10:43.612648Z","fetched_at":"2026-11-21T19:15:55.946353Z","severity":"critical","cvss_score":9.9,"epss":0.0065,"is_kev":false,"has_exploit":false,"kev_due_date":null,"vendor":null,"product":"github.com/semaphoreui/semaphore","vuln_id":"CVE-2026-73294","vuln_ids":["CVE-2026-73294","GHSA-XP7J-H7JC-4W8P","GO-2026-6435"],"tags":["osv","go","fix-available"],"cluster_id":10761,"links":{"self":"https://vulnwatch.ve1ve2.com/api/v1/items/10990","html":"https://vulnwatch.ve1ve2.com/item/10990"}}]}