{"schema":"threatline.record/2","record":{"id":"CVE-2026-102827","aliases":["GHSA-858h-whjf-mvg5"],"summary":"simple-git: unsafe-operations plugin bypass via git long-option abbreviation (--receive-p/--exe) -> command execution (residual of CVE-2026-28291)","details":"simple-git's blockUnsafeOperationsPlugin blocks dangerous git options (--upload-pack/--receive-pack/--exec/...) unless the consumer opts in via unsafe:{allowUnsafePack:true}. Detection (@simple-git/argv-parser detectVulnerableFlags) matches the parsed flag NAME against literal-spelling patterns: /--(upload|receive)-pack/ (requires the literal '-pack') and the string '--exec'. But git accepts unambiguous prefix abbreviations of long options, and expandToken (token-expander.ts) returns the LITERAL token as flag.name (it uses the spec only for needsNext, never to canonicalize). So `git push --receive-p=<cmd>` parses with flag.name='--receive-p', which /--(upload|receive)-pack/ does NOT match, yet git expands --receive-p -> --receive-pack and runs <cmd> (on a local/file remote, locally). The clone side is robust (its '--u' substring rule catches every --upload* abbreviation); the push --receive-* and --exe* abbreviations have no equivalent rule and slip through.\n\nProof of concept (latest: simple-git 3.36.0, @simple-git/argv-parser 1.1.1, default unsafe plugin ON):\nGate vulnerabilityCheck: 'push --receive-pack=touch...' -> BLOCKED; 'push --receive-pa=touch...' and 'push --receive-p=touch...' -> BYPASS (empty vulns); '--exec=' BLOCKED, '--exe=' BYPASS.\nEnd-to-end via simpleGit().push():\n  CONTROL git.push(['../bare','HEAD:refs/heads/c','--receive-pack=touch /tmp/pwned_ctrl;']) -> throws GitPluginError 'Use of --upload-pack or --receive-pack is not permitted...'; no command runs.\n  BYPASS  git.push(['../bare','HEAD:refs/heads/e2e','--receive-p=touch /tmp/pwned_e2e;']) -> NO GitPluginError; /tmp/pwned_e2e CREATED (git executed the injected command); only a later GitError surfaces.\nDirect git confirms `git push ../bare --receive-p='touch X;' HEAD:refs/heads/m` and `--exe='touch Y;'` both execute on a local/path remote.\n\nImpact: any app relying on simple-git's default unsafe-operations protection while passing attacker-influenced options/args into a git push (local/file remote, or attacker-influenced receive-pack target) can be made to execute arbitrary commands -- the exact protection CVE-2026-28291 provided, defeated by an abbreviated spelling. Same class/impact as GHSA-jcxm-m3jx-f287, on the push path.\n\nRemediation: canonicalize git option abbreviations before matching (resolve to the canonical long name via the per-task flag spec in expandToken), or match on the option stem/prefix down to the shortest unambiguous form for push receive-pack/exec (mirroring the clone-side '--u' approach). Also audit --template and -c/config-write detection for the same abbreviation gap.\n\nCredit: anir0y (independent security research).","categories":["Libraries & packages"],"product":"simple-git","vendor":"steveukx","ecosystem":"npm","affected_ranges":[{"source":"GitHub Advisory Database","source_url":"https://github.com/advisories/GHSA-858h-whjf-mvg5","source_modified_at":"2026-10-13T04:52:47Z","fetched_at":"2026-10-23T18:42:43.628194Z","package":{"ecosystem":"npm","name":"simple-git"},"range":"<= 3.36.0"},{"source":"CVE List","source_url":"https://www.cve.org/CVERecord?id=CVE-2026-102827","source_modified_at":"2026-10-02T12:21:16.544Z","fetched_at":"2026-10-23T18:45:31.882637Z","product":"git-js","vendor":"steveukx","versions":[{"version":"< 4.0.0","status":"affected"}],"defaultStatus":null},{"source":"OSV","source_url":"https://osv.dev/vulnerability/GHSA-858h-whjf-mvg5","source_modified_at":"2026-10-06T00:00:10.392204845Z","fetched_at":"2026-10-23T18:42:43.628194Z","package":{"ecosystem":"npm","name":"simple-git","purl":"pkg:npm/simple-git"},"ranges":[{"events":[{"introduced":"0"},{"fixed":"4.0.0"}],"type":"SEMVER"}],"versions":[]}],"fixed_versions":[{"source":"GitHub Advisory Database","source_url":"https://github.com/advisories/GHSA-858h-whjf-mvg5","source_modified_at":"2026-10-13T04:52:47Z","fetched_at":"2026-10-23T18:42:43.628194Z","package":{"ecosystem":"npm","name":"simple-git"},"version":"4.0.0"},{"source":"OSV","source_url":"https://osv.dev/vulnerability/GHSA-858h-whjf-mvg5","source_modified_at":"2026-10-06T00:00:10.392204845Z","fetched_at":"2026-10-23T18:42:43.628194Z","package":{"ecosystem":"npm","name":"simple-git","purl":"pkg:npm/simple-git"},"version":"4.0.0"}],"cvss":8.1,"severity":"High","kev":{"listed":false},"epss":{"probability":0.00395,"percentile":0.32529,"score_date":"2026-10-23"},"published_at":"2026-09-29T18:39:57.688Z","modified_at":"2026-10-13T04:52:47Z","provenance":[{"source":"GitHub Advisory Database","url":"https://github.com/advisories/GHSA-858h-whjf-mvg5","fetched_at":"2026-10-23T18:42:43.628194Z","source_modified_at":"2026-10-13T04:52:47Z"},{"source":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2026-102827","fetched_at":"2026-10-23T18:45:31.882637Z","source_modified_at":"2026-10-02T12:21:16.544Z"},{"source":"OSV","url":"https://osv.dev/vulnerability/GHSA-858h-whjf-mvg5","fetched_at":"2026-10-23T18:42:43.628194Z","source_modified_at":"2026-10-06T00:00:10.392204845Z"},{"source":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2026-102827","fetched_at":"2026-10-23T18:42:43.628194Z","source_modified_at":"2026-10-23"}],"sources":["GitHub Advisory Database","CVE List","OSV","EPSS"],"references":[{"source":"CVE List","url":"https://github.com/steveukx/git-js/security/advisories/GHSA-858h-whjf-mvg5","tags":["x_refsource_CONFIRM"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-102827","source":"GitHub Advisory Database"},{"source":"CVE List","url":"https://github.com/steveukx/git-js/pull/1193","tags":["x_refsource_MISC"]},{"source":"CVE List","url":"https://github.com/steveukx/git-js/commit/98864c678444d9336357c844efa4fd5a7984c0d7","tags":["x_refsource_MISC"]},{"source":"CVE List","url":"https://github.com/steveukx/git-js/releases/tag/simple-git@4.0.0","tags":["x_refsource_MISC"]},{"url":"https://github.com/advisories/GHSA-858h-whjf-mvg5","source":"GitHub Advisory Database"}],"locations":[],"motoko_assessment":{"status":"requires_architecture_review","automatic_remediation":false},"cve_state":"PUBLISHED","ssvc":{"exploitation":"none","automatable":"no","technical_impact":"total","assessed_at":"2026-10-02T12:21:03.495651Z"},"classification":{"method":"product-first software-layer rules","rules_version":"2.1","matched_on":"ecosystem","confidence":"heuristic","reviewed":false},"change_timestamp":"2026-10-13T04:52:47Z","content_hash":"564c0c80adeb46a5d3f048c5ceff92b8e5fd231b5239ebef3800c13bbc31d86b"}}
