CVE-2026-142525: User-controlled inputs are written to the job log unescaped in add-and-commit, allowing workflow commands to be forged
Improper Output Neutralization for Logs (CWE-117) in add-and-commit from 2.3.0 before 11.1.0 allows a party who controls the content of an action input to forge GitHub Actions workflow commands in the job log. The action prints several inputs through core.info(), among them message at src/io.ts, authorname and authoremail, committername and committeremail, and the working directory at src/main.ts. core.info() is implemented as process.stdout.write(message + EOL) and performs no escaping, unlike core.warning(), core.error() and core.debug(), which pass through issueCommand() and escapeData() and therefore replace carriage return and line feed with %0D and %0A. The GitHub Actions runner interprets any line on stdout that begins with ::, so a line feed inside an input ends the action's log line and starts a line the runner reads as a command. A workflow that interpolates event data into one of these inputs, which is what the documented example for message does, lets the author of an issue title, pull request title or commit message place that line feed. ::stop-commands:: ends command processing for the rest of the job, so an ::add-mask:: registered by a later step of the same job is never applied and the value it would have masked is written to the log in cleartext. Annotations can also be forged and the action's own log lines suppressed. From 11.0.0 the project carries a neutralizeLogString() helper covering the C0 and C1 ranges, DEL and the Unicode bidi controls, but it is applied in the log() helper and not on the path that prints the inputs.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
add-and-committo a version that resolves this vulnerability.Fixed in 11.1.0 - Compensating control
On affected versions, do not interpolate event data such as commit messages, issue titles, or pull request titles directly into the message, author_name, author_email, committer_name, or committer_email inputs; pass the data through an intermediate environment variable or sanitize it in a preceding step.
Event History
Frequently Asked Questions
Which workflows are exposed to command forgery?
Workflows using affected add-and-commit versions are exposed when they pass attacker-controlled event data into a logged action input. The documented use of event data in the message input can allow issue-title, pull-request-title, or commit-message authors to supply the required newline and forged command.
Which action inputs can carry the malicious value?
The action logs message, author_name, author_email, committer_name, committer_email, and the working directory through core.info(). A workflow is at risk if untrusted content can reach any of those inputs.
What does an attacker need to exploit this issue?
An attacker needs control over content that the workflow interpolates into one of the affected inputs and must include a line feed followed by a line beginning with ::. The runner interprets such stdout lines as GitHub Actions workflow commands.
Are default action configurations affected?
The affected behavior is present in add-and-commit versions from 2.3.0 before 11.1.0, but exploitation depends on the workflow passing untrusted data to one of the logged inputs. The documented message example is specifically identified as doing so.
What can be done before upgrading?
Avoid interpolating untrusted event data, including issue titles, pull-request titles, and commit messages, into message or the other affected inputs. Upgrade to version 11.1.0 or later when possible.