Home › CVE › Vulnerabilities
CVE-2026-142541 — EndBug add-and-commit
One of 2 EndBug add-and-commit vulnerabilities published together by NVD: our article covers all of them.
VulnerabilitiesSummary
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.
Severity breakdown
Medium · 6.3
An attacker without an account can exploit this over the network, without any user action, but only under specific conditions.
- Attack from
- the network (remotely)
- Attack complexity
- low (no special conditions)
- Special conditions
- only in some setups or conditions
- Login needed
- no
- User action needed
- no
- Impact
- low on integrity, none on confidentiality and availability
- Impact on other systems
- low on confidentiality and integrity, none on availability
Weakness
- CWE-88: Improper Neutralization of Argument Delimiters in a Command ('Argument Injection')
Affected and fixed versions
| Product | Affected versions | Fixed in |
|---|---|---|
| EndBug add-and-commit | ≥ 5.0.0, < 11.0.0 | 11.0.0 |
References by type
Patches and fixed releases
- github.com/EndBug/add-and-commit/commit/b4a0134716b4bf226c6b957f03ee862…
- github.com/EndBug/add-and-commit/pull/755
- github.com/EndBug/add-and-commit/releases/tag/v11.0.0
Other references
Affected
- EndBug add-and-commit
What to do
- Follow the vendor advisory and the references below for fixed versions and workarounds.
Frequently asked questions
What is CVE-2026-142541?
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. Weakness type: Improper Neutralization of Argument Delimiters in a Command ('Argument Injection') (CWE-88).
How severe is CVE-2026-142541?
CVE-2026-142541 has a CVSS 4.0 base score of 6.3 (medium), from the CNA. An attacker without an account can exploit this over the network, without any user action, but only under specific conditions.
Is CVE-2026-142541 being exploited?
Not as far as is known: CVE-2026-142541 is not in CISA's Known Exploited Vulnerabilities catalog as of December 2, 2026.
Which versions are affected by CVE-2026-142541?
EndBug add-and-commit ≥ 5.0.0, < 11.0.0 (fixed in 11.0.0).
How do I fix CVE-2026-142541?
Update to a fixed release: EndBug add-and-commit 11.0.0.