Description
Improper Check for Unusual or Exceptional Conditions (CWE-754) in add-and-commit, in src/main.ts, from 5.0.0 before 11.0.0. A contributor who controls a directory under the add pathspec can commit a gitlink of their choosing. The add input takes the arguments for git add, and the default value is .. git add records a directory that has its own nested .git directory as a gitlink. The index entry has mode 160000 and names the commit at the nested repository's HEAD. git stores none of the files inside that directory, writes a warning and the remediation hints to stderr, and exits 0. add() in src/main.ts, at lines 220 to 258 in 10.0.0, calls simple-git's add() with a callback that reaches log(). simple-git builds that task with straightThroughStringTask, whose parser takes one argument, so callTaskParser passes stdout and stderr and the parser returns stdout alone. isTaskError is exitCode && stdErr.length, so a zero exit code raises no error, whatever stderr contains. log() in src/util.ts prints the data and reports the error, and both arguments are empty, so the job log shows no warning. add() never reads the staged entries back, so the commit keeps the gitlink, whose path and commit name the contributor sets. The value reaches the action in a workflow that checks out pull request content and then runs the action over a pathspec that covers that content.
Published: 2026-12-04
Score: 6.3 Medium
EPSS: n/a
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Analysis and contextual insights are available on OpenCVE Cloud.

Remediation

Vendor Solution

Upgrade to add-and-commit 11.0.0 or later, which reads the staged entries back with findUnexpectedGitlinks and stops the commit on a new mode-160000 entry. On an affected version, delete every nested .git directory from the working tree before the action runs, or narrow the add pathspec to the paths the workflow writes.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Fri, 04 Dec 2026 15:45:00 +0000

Type Values Removed Values Added
Description Improper Check for Unusual or Exceptional Conditions (CWE-754) in add-and-commit, in src/main.ts, from 5.0.0 before 11.0.0. A contributor who controls a directory under the add pathspec can commit a gitlink of their choosing. The add input takes the arguments for git add, and the default value is .. git add records a directory that has its own nested .git directory as a gitlink. The index entry has mode 160000 and names the commit at the nested repository's HEAD. git stores none of the files inside that directory, writes a warning and the remediation hints to stderr, and exits 0. add() in src/main.ts, at lines 220 to 258 in 10.0.0, calls simple-git's add() with a callback that reaches log(). simple-git builds that task with straightThroughStringTask, whose parser takes one argument, so callTaskParser passes stdout and stderr and the parser returns stdout alone. isTaskError is exitCode && stdErr.length, so a zero exit code raises no error, whatever stderr contains. log() in src/util.ts prints the data and reports the error, and both arguments are empty, so the job log shows no warning. add() never reads the staged entries back, so the commit keeps the gitlink, whose path and commit name the contributor sets. The value reaches the action in a workflow that checks out pull request content and then runs the action over a pathspec that covers that content.
Title add-and-commit commits a nested git repository as a gitlink chosen by an outside contributor
First Time appeared Endbug
Endbug add-and-commit
Weaknesses CWE-754
CPEs cpe:2.3:a:endbug:add-and-commit:*:*:*:*:*:*:*:*
Vendors & Products Endbug
Endbug add-and-commit
References
Metrics cvssV4_0

{'score': 6.3, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N'}


Subscriptions

Endbug Add-and-commit
cve-icon MITRE

Status: PUBLISHED

Assigner: Secur0

Published:

Updated: 2026-12-04T15:36:57.929Z

Reserved: 2026-12-04T13:34:40.685Z

Link: CVE-2026-144938

cve-icon Vulnrichment

No data.

cve-icon NVD

No data.

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

No data.

Weaknesses
  • CWE-754

    Improper Check for Unusual or Exceptional Conditions