CVE-2026-142541
Received Received - Intake

Command Injection in add-and-commit Action

Vulnerability report for CVE-2026-142541, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-12-02

Last updated on: 2026-12-02

Assigner: Secur0

Description

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.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-12-02
Last Modified
2026-12-02
Generated
2026-12-03
AI Q&A
2026-12-02
EPSS Evaluated
N/A
NVD
EUVD

Affected Vendors & Products

Showing 1 associated CPE
Vendor Product Version / Range
EndBug add-and-commit From 5.0.0 (inc) to 11.0.0 (exc)

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-88 The product constructs a string for a command to be executed by a separate component in another control sphere, but it does not properly delimit the intended arguments, options, or switches within that command string.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

This vulnerability involves improper handling of branch names in the add-and-commit GitHub action. A malicious actor controlling a branch name can inject arguments like --force into git commands, causing unintended behavior such as discarding staged changes or overwriting remote branches.

Impact Analysis

An attacker could force push malicious code to a repository, overwrite existing commits, or erase staged changes. This could lead to data loss, unauthorized code execution, or disruption of workflows relying on the action.

Mitigation Strategies

Update the add-and-commit action to version 11.0.0 or later to address the improper neutralization of argument delimiters. Review workflows using this action to ensure branch names are validated and do not contain leading hyphens or other special characters that could be misinterpreted as git options.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-142541. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart

Security Radar

News mentioning this vulnerability
Loading related security news...