{"id":"CVE-2020-26222","aliases":["CVE-2020-26222","GHSA-23f7-99jx-m54r"],"related":[],"kind":"vulnerability","state":"published","title":"Remote code execution in dependabot-core","summary":"Dependabot is a set of packages for automated dependency management for Ruby, JavaScript, Python, PHP, Elixir, Rust, Java, .NET, Elm and Go. In Dependabot-Core from version 0.119.0.beta1 before version 0.125.1, there is a remote code execution vulnerability in dependabot-common and dependabot-go_modules when a source branch name contains malicious injectable bash code. For example, if Dependabot is configured to use the following source branch name: \"/$({curl,127.0.0.1})\", Dependabot will make a HTTP request to the following URL: 127.0.0.1 when cloning the source repository. The fix was applied to version 0.125.1. As a workaround, one can escape the branch name prior to passing it to the Dependabot::Source class.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Dependabot is a set of packages for automated dependency management for Ruby, JavaScript, Python, PHP, Elixir, Rust, Java, .NET, Elm and Go. In Dependabot-Core from version 0.119.0.beta1 before version 0.125.1, there is a remote code execution vulnerability in dependabot-common and dependabot-go_modules when a source branch name contains malicious injectable bash code. For example, if Dependabot is configured to use the following source branch name: \"/$({curl,127.0.0.1})\", Dependabot will make a HTTP request to the following URL: 127.0.0.1 when cloning the source repository. The fix was applied to version 0.125.1. As a workaround, one can escape the branch name prior to passing it to the Dependabot::Source class.","source":"cvelist"},{"lang":"en","text":"### Impact\nRemote code execution vulnerability in `dependabot-common` and  `dependabot-go_modules` when a source branch name contains malicious injectable bash code.\n\nFor example, if Dependabot is configured to use the following source branch name: `\"/$({curl,127.0.0.1})\"`, Dependabot will make a HTTP request to the following URL: 127.0.0.1 when cloning the source repository.\n\nWhen Dependabot is configured to clone the source repository during an update, Dependabot runs a shell command to git clone the repository:\n\n```bash\ngit clone --no-tags --no-recurse-submodules --depth=1 --branch=<BRANCH> --single-branch <GITHUB_REPO_URL> repo/contents/path\n```\n\nDependabot will always clone the source repository for `go_modules` during the file fetching step and can be configured to clone the repository for other package managers using the `FileFetcher` class from `dependabot-common`.\n\n```ruby\nsource = Dependabot::Source.new(\n  provider: \"github\",\n  repo: \"repo/name\",\n  directory: \"/\",\n  branch: \"/$({curl,127.0.0.1})\",\n)\n\nrepo_contents_path = \"./file/path\"\nfetcher = Dependabot::FileFetchers.for_package_manager(\"bundler\").\n                  new(source: source, credentials: [],\n                  repo_contents_path: repo_contents_path)\nfetcher.clone_repo_contents\n```\n\n### Patches\n\nThe fix was applied to version `0.125.1`: https://github.com/dependabot/dependabot-core/pull/2727\n\n### Workarounds\nEscape the branch name prior to passing it to the `Dependabot::Source` class.\n\nFor example using `shellwords`:\n\n```ruby\nrequire \"shellwords\"\nbranch = Shellwords.escape(\"/$({curl,127.0.0.1})\")\nsource = Dependabot::Source.new(\n  provider: \"github\",\n  repo: \"repo/name\",\n  directory: \"/\",\n  branch: branch,\n)\n```","format":"markdown","source":"ghsa"},{"lang":"es","text":"Dependabot es un conjunto de paquetes para la administración automatizada de dependencias para Ruby, JavaScript, Python, PHP, Elixir, Rust, Java, .NET, Elm y Go.&#xa0;En Dependabot-Core desde la versión 0.119.0.beta1 versiones anteriores a 0.125.1, se presenta una vulnerabilidad de ejecución de código remota en dependdabot-common y dependdabot-go_modules cuando el nombre de una rama de origen contiene código bash inyectable malicioso.&#xa0;Por ejemplo, si Dependabot está configurado para usar el siguiente nombre de rama de origen: \"/$({curl,127.0.0.1})\", Dependabot realizará una petición HTTP a la siguiente URL: 127.0.0.1 cuando clona el repositorio de origen.&#xa0;La corrección fue aplicada en versión 0.125.1.&#xa0;Como solución alternativa, se puede escapar el nombre de la rama antes de pasarlo a la clase Dependabot::Source","source":"nvd"}],"published":"2020-11-13T15:47:50.000Z","modified":"2026-07-08T06:29:09.252Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N","score":8.7,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N","score":8.7,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N","score":8.7,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":8.8,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:N/AC:L/Au:S/C:P/I:P/A:P","score":6.5,"rating":"MEDIUM"}],"cwes":["CWE-74"],"affected":[{"ranges":[{"version":"< 0.125.1","status":"affected"}],"vendor":"dependabot","product":"dependabot-core","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0.119.0.beta1","status":"affected","fixed":"0.125.1"}],"ecosystem":"RubyGems","package":"dependabot-omnibus","purl":"pkg:gem/dependabot-omnibus","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0.119.0.beta1","status":"affected","fixed":"0.125.1"}],"ecosystem":"RubyGems","package":"dependabot-common","purl":"pkg:gem/dependabot-common","source":"ghsa"},{"ranges":[{"status":"affected","introduced":"0.119.1","fixed":"0.125.1"},{"status":"affected","version":"0.119.0"},{"status":"affected","version":"0.119.0"}],"vendor":"dependabot_project","product":"dependabot","cpe":"cpe:2.3:a:dependabot_project:dependabot:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/dependabot/dependabot-core/security/advisories/GHSA-23f7-99jx-m54r","tags":["exploit","third-party-advisory","web","x-refsource-confirm","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/dependabot/dependabot-core/pull/2727","tags":["patch","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/dependabot/dependabot-core/commit/e089116abbe284425b976f7920e502b8e83a61b5","tags":["patch","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2020-26222","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/dependabot/dependabot-core","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/rubysec/ruby-advisory-db/blob/master/gems/dependabot-common/CVE-2020-26222.yml","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/rubysec/ruby-advisory-db/blob/master/gems/dependabot-omnibus/CVE-2020-26222.yml","tags":["web"],"sources":["ghsa"]},{"url":"https://rubygems.org/gems/dependabot-common","tags":["web"],"sources":["ghsa"]},{"url":"https://rubygems.org/gems/dependabot-omnibus","tags":["web"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2020-26222","url":"https://www.cve.org/CVERecord?id=CVE-2020-26222","licence":"CVE Terms of Use","modified":"2024-08-04T15:49:07.167Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-23f7-99jx-m54r","url":"https://github.com/advisories/GHSA-23f7-99jx-m54r","licence":"CC-BY-4.0","modified":"2026-07-08T06:29:09.252Z"},{"source":"nvd","name":"NVD","id":"CVE-2020-26222","url":"https://nvd.nist.gov/vuln/detail/CVE-2020-26222","licence":"Public domain","modified":"2026-06-17T03:07:51.293Z"}],"updatedAt":"2026-11-25T22:57:55.804Z","epss":{"score":0.03088,"percentile":0.88055,"date":"2026-12-01T12:00:22.000Z"}}