PT-2022-19473 · Github · Github-Action-Merge-Dependabot
Uzlopak
·
Published
2022-05-31
·
Updated
2022-06-15
·
CVE-2022-29220
CVSS v3.1
6.5
Medium
| Vector | AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N |
Name of the Vulnerable Software and Affected Versions
github-action-merge-dependabot versions prior to 3.2.0
Description
github-action-merge-dependabot is an action that automatically approves and merges dependabot pull requests (PRs). Prior to version 3.2.0, it does not check if a commit created by dependabot is verified with the proper GPG key. There is just a check if the actor is set to
dependabot[bot] to determine if the PR is a legit PR. Theoretically, an owner of a seemingly valid and legit action in the pipeline can check if the PR is created by dependabot and if their own action has enough permissions to modify the PR in the pipeline. If so, they can modify the PR by adding a second seemingly valid and legit commit to the PR, as they can set arbitrarily the username and email in for commits in git. Because the bot only checks if the actor is valid, it would pass the malicious changes through and merge the PR automatically, without getting noticed by project maintainers. It would probably not be possible to determine where the malicious commit came from, as it would only say dependabot[bot] and the corresponding email-address.Recommendations
For versions prior to 3.2.0, update to version 3.2.0 or later to resolve the issue. As a temporary workaround, consider manually verifying the commits in dependabot pull requests before merging them. Restrict access to the pipeline to minimize the risk of exploitation. Avoid using the
username and email variables in git commits until the issue is resolved.Exploit
Fix
Insufficient Verification of Data Authenticity
Found an issue in the description? Have something to add? Feel free to write us 👾
Related Identifiers
Affected Products
Github-Action-Merge-Dependabot