Read the docs

Branch name parsed as git option in add-and-commit allows forced push

Priority LOW 29CWE-88Published · Updated

Key facts

Attack vector
Network
Privileges required
None
User interaction
None
Attack complexity
Low
Attack requirements
Present
Impact type
Code execution
Confidentiality · integrity · availability
None · Low · None
Fix status
Fixed

Attack profile from CVSS 4.0 · CNA. Fix status from CNA. Impact type from CWE-88.

Summary

add-and-commit from 5.0.0 before 11.0.0 passes the new_branch input to git as a positional value without validation, so a value beginning with a hyphen is read as a git option (CWE-88). An attacker who controls the branch name a workflow passes to the action can run git checkout and git push with an option of their choosing, which can overwrite the remote branch history without privileges.

Written with Claude Haiku 5.5 from the sources below · 2026-12-04

Description from the CNA

Improper Neutralization of Argument Delimiters in a Command (CWE-88) in add-and-commit from 5.0.0 before 11.0.0 allows a party who controls the branch name a workflow passes to the action to run git checkout and git push with an option of their choosing. The new_branch input, called branch before 8.0.0, is used as a single positional value and is never passed through matchGitArgs() or validated, unlike the inputs the README documents as taking raw git arguments. src/main.ts hands it to simple-git's checkout(), which builds the argument vector ['checkout', value], and on the default push path to push(), which builds ['push', 'origin', value, '--set-upstream']. git parses every element of its argument vector for a leading hyphen wherever it appears, so a value of --force is taken as the option and not as a branch name. The two commands become git checkout --force, which discards the staged changes the action was about to commit, and git push origin --force --set-upstream, which overwrites the remote branch with the runner's local state and removes from its history any commits pushed since that checkout. git's reference name rules permit a leading hyphen, so a branch named --force can be created and pushed to a fork with git push origin HEAD:refs/heads/--force, although the git branch porcelain refuses such a name; a workflow that derives new_branch from a head branch name therefore takes the value from whoever opened the pull request. The action reports committed and pushed as true and logs that the branch already existed.

Why it matters now

EPSS 0.00688 54th percentileScored 2026-12-04
Fix Fixed add-and-commit (EndBug): 11.0.0

SSVC decision points

Not available: CISA has not published SSVC decision points for this record.

Affected products

VendorProductAffected versionsFixed inStatusSource
EndBugadd-and-commit5.0.0 to before 11.0.011.0.0Patch availableCNA
  • add-and-commit VendorEndBug Affected 5.0.0 to before 11.0.0 Fixed in 11.0.0 Patch available CNA

CPE names CNA · 1

CPEVersionsRoleVendor
cpe:2.3:a:endbug:add-and-commit:*:*:*:*:*:*:*:*——EndBug
  • cpe:2.3:a:endbug:add-and-commit:*:*:*:*:*:*:*:* Versions — — ·EndBug

Remediation

Update EndBug add-and-commit to 11.0.0, the first fixed version.

Written with Claude Haiku 5.5 from the sources below · 2026-12-04

  • Fix · CNA add-and-commit (EndBug) Fixed in 11.0.0

Vendor assessments

Red Hat

Red Hat's page for this CVE →

Not affected: 1 product
  • Red Hat

Timeline

  1. 2026-12-02 Threatist record created from CVE-2026-142541
  2. 2026-12-02 Alias added: GHSA-7598-99vj-v7x8
  3. 2026-12-04 Affected versions changed · Red Hat
  4. 2026-12-04 CVSS score added · Red Hat

References

  • TI-2026-104184 add-and-commit commits nested repositories as gitlinks from outside input CVSS 4.0MEDIUM 6.3
  • TI-2026-102549 Unescaped inputs in add-and-commit allow forged workflow commands CVSS 4.0MEDIUM 6.3

Sources