CVE-2026-142541

Description

A flaw was found in add-and-commit. A remote attacker can cause unauthorized repository modifications by submitting a specially crafted branch name. Because input branch names are not properly sanitized before execution, leading hyphens are interpreted by Git as command-line flags. This allows an attacker to discard uncommitted changes or force-overwrite remote repository branch history.

Statement

Red Hat has evaluated this vulnerability as having a Moderate severity because exploitation requires a workflow configured to accept untrusted branch names, and successful exploitation is limited to argument manipulation during automated Git operations rather than arbitrary remote code execution on the host system. The affected component is a GitHub Action used for automated commits in CI/CD pipelines and is not included by default in Red Hat Enterprise Linux or core container platforms. Workflows that sanitize user inputs or restrict pull request triggers are not exposed to this risk.

Mitigation

Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base, or stability.

Understanding the Weakness (CWE)

Confidentiality,Integrity,Availability,Other

Technical Impact: Execute Unauthorized Code or Commands; Alter Execution Logic; Read Application Data; Modify Application Data

If an attacker can provide an untrusted input that contains argument-separating delimiters, then the resulting command will have more arguments than intended by the developer, potentially changing the expected behavior of the command. Depending on the functionality supported by the extraneous arguments, this may have security-relevant consequences. The attacker could include arguments that allow unintended commands or code to be executed, allow sensitive data to be read or modified, or cause other unintended behavior.

Frequently Asked Questions

Want to get errata notifications? Sign up here.