add-and-commit commits nested repositories as gitlinks from outside input
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Attack requirements
- Present
- Impact type
- —
- Confidentiality · integrity · availability
- None · Low · None
- Fix status
- Fixed
Attack profile from CVSS 4.0 · CNA. Fix status from CNA.
Summary
EndBug add-and-commit from 5.0.0 before 11.0.0 commits a nested git repository as a gitlink of the contributor's choosing. A contributor who controls a directory under the add pathspec can have that directory committed as a gitlink, while git stores none of its files and reports only a warning on stderr that the action ignores because the exit code is zero. The flaw is an improper check for unusual or exceptional conditions (CWE-754), so the job log shows no warning and the commit keeps the gitlink. The action is exposed in workflows that check out pull request content and then run it over that content, with no user interaction needed.
Written with Claude Haiku 5.5 from the sources below · 2026-12-04
Description from the CNA
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.
Why it matters now
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
Remediation
Update add-and-commit to version 11.0.0 or later. The sources list no fix for other products.
Written with Claude Haiku 5.5 from the sources below · 2026-12-04
- Fix · CNA add-and-commit (EndBug) Fixed in 11.0.0
Timeline
- 2026-12-04 Threatist record created from CVE-2026-144938
References
Patch 2
Advisory 1
More EndBug vulnerabilities
- TI-2026-102550 Branch name parsed as git option in add-and-commit allows forced push CVSS 4.0MEDIUM 6.3
- TI-2026-102549 Unescaped inputs in add-and-commit allow forged workflow commands CVSS 4.0MEDIUM 6.3
Sources
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences