{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-144938","assignerOrgId":"4daa8cea-433a-44bd-9456-53b127fc289a","state":"PUBLISHED","assignerShortName":"Secur0","dateReserved":"2026-12-04T13:34:40.685Z","datePublished":"2026-12-04T15:36:57.929Z","dateUpdated":"2026-12-04T15:36:57.929Z"},"containers":{"cna":{"providerMetadata":{"orgId":"4daa8cea-433a-44bd-9456-53b127fc289a","shortName":"Secur0","dateUpdated":"2026-12-04T15:36:57.929Z"},"title":"add-and-commit commits a nested git repository as a gitlink chosen by an outside contributor","datePublic":"2026-12-04T15:33:00.000Z","problemTypes":[{"descriptions":[{"lang":"en","cweId":"CWE-754","description":"CWE-754 Improper Check for Unusual or Exceptional Conditions","type":"CWE"}]}],"affected":[{"vendor":"EndBug","product":"add-and-commit","repo":"https://github.com/EndBug/add-and-commit","programFiles":["src/main.ts","src/util.ts"],"versions":[{"status":"affected","version":"5.0.0","lessThan":"11.0.0","versionType":"semver"}],"defaultStatus":"unaffected","cpes":["cpe:2.3:a:endbug:add-and-commit:*:*:*:*:*:*:*:*"],"packageURL":"pkg:github/endbug/add-and-commit"}],"cpeApplicability":[{"nodes":[{"cpeMatch":[{"criteria":"cpe:2.3:a:endbug:add-and-commit:*:*:*:*:*:*:*:*","versionEndExcluding":"11.0.0","versionStartIncluding":"5.0.0","vulnerable":true}],"negate":false,"operator":"OR"}],"operator":"OR"}],"descriptions":[{"lang":"en","value":"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.","supportingMedia":[{"type":"text/html","base64":false,"value":"Improper Check for Unusual or Exceptional Conditions (CWE-754) in add-and-commit, in <code>src/main.ts</code>, from 5.0.0 before 11.0.0. A contributor who controls a directory under the <code>add</code> pathspec can commit a gitlink of their choosing. The <code>add</code> input takes the arguments for <code>git add</code>, and the default value is <code>.</code>. <code>git add</code> records a directory that has its own nested <code>.git</code> directory as a gitlink. The index entry has mode <code>160000</code> 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. <code>add()</code> in <code>src/main.ts</code>, at lines 220 to 258 in 10.0.0, calls simple-git's <code>add()</code> with a callback that reaches <code>log()</code>. simple-git builds that task with <code>straightThroughStringTask</code>, whose parser takes one argument, so <code>callTaskParser</code> passes stdout and stderr and the parser returns stdout alone. <code>isTaskError</code> is <code>exitCode &amp;&amp; stdErr.length</code>, so a zero exit code raises no error, whatever stderr contains. <code>log()</code> in <code>src/util.ts</code> prints the data and reports the error, and both arguments are empty, so the job log shows no warning. <code>add()</code> 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."}]}],"tags":["x_open-source"],"references":[{"url":"https://github.com/EndBug/add-and-commit/commit/ebc24bfdec878c7a9b73d6fd429c88cbb0316100","tags":["patch"]},{"url":"https://github.com/EndBug/add-and-commit/pull/761","tags":["patch"]},{"url":"https://github.com/EndBug/add-and-commit/releases/tag/v11.0.0","tags":["release-notes"]},{"url":"https://secur0.com/en/cna/cve-list/cve-2026-144938-add-and-commit-unchecked-gitlink-in-git-add","tags":["third-party-advisory","technical-description"]}],"metrics":[{"format":"CVSS","scenarios":[{"lang":"en","value":"GENERAL"}],"cvssV4_0":{"attackVector":"NETWORK","attackComplexity":"LOW","attackRequirements":"PRESENT","privilegesRequired":"NONE","userInteraction":"NONE","vulnConfidentialityImpact":"NONE","subConfidentialityImpact":"NONE","vulnIntegrityImpact":"LOW","subIntegrityImpact":"NONE","vulnAvailabilityImpact":"NONE","subAvailabilityImpact":"NONE","exploitMaturity":"NOT_DEFINED","Safety":"NOT_DEFINED","Automatable":"NOT_DEFINED","Recovery":"NOT_DEFINED","valueDensity":"NOT_DEFINED","vulnerabilityResponseEffort":"NOT_DEFINED","providerUrgency":"NOT_DEFINED","version":"4.0","baseSeverity":"MEDIUM","baseScore":6.3,"vectorString":"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"}}],"solutions":[{"lang":"en","value":"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.","supportingMedia":[{"type":"text/html","base64":false,"value":"Upgrade to add-and-commit 11.0.0 or later, which reads the staged entries back with <code>findUnexpectedGitlinks</code> and stops the commit on a new mode-<code>160000</code> entry. On an affected version, delete every nested <code>.git</code> directory from the working tree before the action runs, or narrow the <code>add</code> pathspec to the paths the workflow writes."}]}],"credits":[{"lang":"en","value":"Lois del Río Somoza","type":"finder"},{"lang":"en","value":"Xoán M. Otero Jorge","type":"analyst"},{"lang":"en","value":"Darío Rivas Quero","type":"analyst"},{"lang":"en","value":"Secur0 CNA","type":"coordinator"},{"lang":"en","value":"Federico Grandi @EndBug","type":"remediation developer"}],"source":{"discovery":"EXTERNAL"},"x_generator":{"engine":"Vulnogram 1.0.5"}}}}