chore(deps): update dependency bundler to v2 [security] - autoclosed #9
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
"~> 1.5"->"~> 2.2", ">= 2.2.33"GitHub Vulnerability Alerts
CVE-2021-43809
In
bundlerversions before 2.2.33, when working with untrusted and apparently harmlessGemfile's, it is not expected that they lead to execution of external code, unless that's explicit in the ruby code inside theGemfileitself. However, if theGemfileincludesgementries that use thegitoption with invalid, but seemingly harmless, values with a leading dash, this can be false.To handle dependencies that come from a Git repository instead of a registry, Bundler uses various commands, such as
git clone. These commands are being constructed using user input (e.g. the repository URL). When building thecommands, Bundler versions before 2.2.33 correctly avoid Command Injection vulnerabilities by passing an array of arguments instead of a command string. However, there is the possibility that a user input starts with a dash (
-) and is therefore treated as an optional argument instead of a positional one. This can lead to Code Execution because some of the commands have options that can be leveraged to run arbitrary executables.Since this value comes from the
Gemfilefile, it can contain any character, including a leading dash.Exploitation
To exploit this vulnerability, an attacker has to craft a directory containing a
Gemfilefile that declares a dependency that is located in a Git repository. This dependency has to have a Git URL in the form of-u./payload. This URLwill be used to construct a Git clone command but will be interpreted as the upload-pack argument. Then this directory needs to be shared with the victim, who then needs to run a command that evaluates the Gemfile, such as
bundle lock, inside.Impact
This vulnerability can lead to Arbitrary Code Execution, which could potentially lead to the takeover of the system. However, as explained above, the exploitability is very low, because it requires a lot of user interaction. It still could put developers at risk when dealing with untrusted files in a way they think is safe, because the exploit still works when the victim tries to make sure nothing can happen, e.g. by manually reviewing the
Gemfile(although they would need the weird URL with a leading dash to not raise any flags).This kind of attack vector has been used in the past to target security researchers by sending them projects to collaborate on.
Patches
Bundler 2.2.33 has patched this problem by inserting
--as an argument before any positional arguments to those Git commands that were affected by this issue.Workarounds
Regardless of whether users can upgrade or not, they should review any untrustred
Gemfile's before running anybundlercommands that may read them, since they can contain arbitrary ruby code.References
https://cwe.mitre.org/data/definitions/88.html
CVE-2016-7954
Bundler 1.x might allow remote attackers to inject arbitrary Ruby code into an application by leveraging a gem name collision on a secondary source. NOTE: this might overlap CVE-2013-0334.
Release Notes
rubygems/rubygems (bundler)
v2.2.33Compare Source
Security fixes:
Enhancements:
--versionparameter tobundle infocommand #5137Errno::EACCESerror be raised in compact index updater #5110bundle gemskeleton #5041bundle execis used #4815Bug fixes:
$LOAD_PATH#5111bundle doctor#5102bundle installafter changing global source #5090bundle infosometimes claiming that bundler has been deleted #5097Documentation:
v2.2.32Compare Source
Enhancements:
bundle vizdeprecation #5083shellsplitinstead of array of strings for git push #5062default_ignoresoption for standard #5003Bug fixes:
Gemfileand runningbundle update#5078v2.2.31Compare Source
Enhancements:
bundler-graphplugin inbundle vizdeprecation message #5061bundler/setup#5033tsort#5032bundle gem#4411Bug fixes:
MANPATH#5039v2.2.30Compare Source
Enhancements:
bundler/gem_tasksfail #4872bundle installto reinstall deleted gems #4974Bug fixes:
bundle infoshow a proper warning every time it finds a deleted gem #4971v2.2.29Compare Source
Enhancements:
rubygem_pushprerequisite #4930v2.2.28Compare Source
Enhancements:
--installflag tobundle removeand trigger install by default #4891v2.2.27Compare Source
Enhancements:
Bug fixes:
branches:to template for GitHub Actions #4883bundle plugin installdetection of already installed plugins #4869bundle checkshowing duplicated gems when multiple platforms are locked #4854bundle checkincorrectly considering cached gems #4853v2.2.26Compare Source
Enhancements:
RUBYGEMS_GEMDEPSwarning #4827bundle gem#4619bundle execkeep file descriptors by default #4812bundle gem#4650bundle install --standaloneresilient to moving the application to a differently nested folder whenpathsources are used #4792bundle gem#4033Bug fixes:
BUNDLE_USER_HOMEenv when choosing config location #4828bundle gemon path with spaces #4816v2.2.25Compare Source
Deprecations:
bundle cache --path#4496Enhancements:
shellwordslibrary #4786bundle installerrors instead of a more brittlegem installhint #4778Bug fixes:
BUNDLE_USER_CONFIGno longer respected as config location #4797--standaloneinstallation of default gems #4782--quietflag not printing warnings #4781v2.2.24Compare Source
Bug fixes:
bundle plugin install --helpshowingbundle install's help #4756bundle checkshows uniq missing gems #4749Performance:
bundler/setup#4750v2.2.23Compare Source
Enhancements:
bundle installon truffleruby selecting incorrect variant forsorbet-staticgem #4625Bug fixes:
bundle plugin install foocrashing #4734v2.2.22Compare Source
Enhancements:
bundle update#4713getaddrinfoerrors not treated as fatal on non darwin platforms #4703Bug fixes:
bundle update <gem>sometimes hanging andbundle lock --updatenot being able to update an insecure lockfile to the new format if it requires downgrades #4652bundle doctorcrashing when finding a broken symlink #4707--conservativeflag unexpectedly updating indirect dependencies. NOTE: As part of this bug fix, some undocumented, unintentional code causingbundle update --source <gem>to update conservatively was fixed. Use the documentedbundle update --conservative <gem>instead #4692v2.2.21Compare Source
Security fixes:
Enhancements:
Bug fixes:
bundle install --localhitting the network whencache_all_platformsconfigured #4677v2.2.20Compare Source
Enhancements:
resolvunnecessarily #4640Bug fixes:
bundle outdatededge case #4648bundle checkwith scoped rubygems sources #4639Performance:
extra_rdoc_fileswith md files in gemspec to make installing bundler with docs faster #4628v2.2.19Compare Source
Bug fixes:
v2.2.18Compare Source
Security fixes:
Enhancements:
required_ruby_version#4598Bug fixes:
v2.2.17Compare Source
Enhancements:
ENV#4565bundle envandbundle config#4566bundle pristineerror ifBUNDLE_GEMFILEdoes not exist #4536Bug fixes:
bundle cachewith an up-to-date lockfile and specs not already installed #4554deploymentsetting in inline mode #4523Performance:
v2.2.16Compare Source
Enhancements:
--github-usernameoption and config tobundle gem#3687tmpdirlibrary copy #4506rake build:checksumtask to build checksums for a gem package #4156bundle infoerror when gem is on a "disabled" group #4492bundle outdatedoutput #4474bundle update#4473Bug fixes:
v2.2.15Compare Source
Enhancements:
Bug fixes:
v2.2.14Compare Source
Security fixes:
Bug fixes:
rakeavailable to other gems' installers right after it's installed #4428v2.2.13Compare Source
Enhancements:
Bug fixes:
v2.2.12Compare Source
Bug fixes:
nilgemspec on install/update and make those faster #4409v2.2.11Compare Source
Bug fixes:
v2.2.10Compare Source
Security fixes:
Bug fixes:
Documentation:
v2.2.9Compare Source
Enhancements:
Bug fixes:
v2.2.8Compare Source
Enhancements:
bundle gem#4093set#4297Bug fixes:
Performance:
v2.2.7Compare Source
Enhancements:
Bug fixes:
force_ruby_platformno longer being respected #4302Performance:
v2.2.6Compare Source
Enhancements:
Bug fixes:
Performance:
v2.2.5Compare Source
Enhancements:
Bug fixes:
rake releasefrom an ambiguous ref #4219v2.2.4Compare Source
Bug fixes:
v2.2.3Compare Source
Security fixes:
Enhancements:
--versionparameter tobundle infocommand #5137Errno::EACCESerror be raised in compact index updater #5110bundle gemskeleton #5041bundle execis used #4815Bug fixes:
$LOAD_PATH#5111bundle doctor#5102bundle installafter changing global source #5090bundle infosometimes claiming that bundler has been deleted #5097Documentation:
v2.2.2Compare Source
Enhancements:
rubygem_pushprerequisite #4930v2.2.1Compare Source
Bug fixes:
v2.2.0Compare Source
Enhancements:
require_relativetorequire#4066--all-platformsflag tobundle binstubsto generate binstubs for all platforms #3886erb#4011Bug fixes:
Bundler::Plugin::API::Source#to_shaving empty source type #4084bundle exec#4063zeitwerkinside a nestedbundle execinvocation #4062specific_platformby default #4015cache_all_platformsandspecific_platformconfigured #4042bundle installandbundle update#3534specific_platformandcache_allwithbundle cache --all-platforms#4022bundler/inline#3991Documentation:
bundle-install.1(v2.1) #4079v2.1.4Compare Source
Bug fixes:
net-http-pipelineno longer being allowed in Gemfiles if already installed in the system due to our vendored version ofnet-http-persistentoptionally requiring it #7529v2.1.3Compare Source
Bug fixes:
rake buildwhen path has spaces on it #7514rake releasegit push tasks when the running shell hasgitas an alias of another command (likehub) #7510bundle config set deployment truerecommended alternative tobundle config --deploymentto behave in the same way as the--deploymentflag #7519v2.1.2Compare Source
Bug fixes:
require "rubygems"on toprubygems_integration.rbto avoid some missing constant errors under some convoluted setups #7505v2.1.1Bug fixes:
rubygemsstill being silent #7493rubygems-bundlerso that binstubs work underRVM#7498v2.1.0Features:
Add support for new default gems. In particular,
open3#7455cgi: #7456uri#7460plus other PRs removing or lazily loading usages of these gems from other places to not interfere with user's choice, such as #7471 or #7473
Bug fixes:
bundle exec rake installfailing #7474bundle exec'ing to rubygems being silent #7442BUNDLE_GEMFILEinbundler/inline#7418gemDSL's:globoption for selecting gemspecs from a specific source #7419Enhancements:
bundle configno longer warns when using "old interface" (might be deprecated again in the future) #7475bundle updateno longer warns when used without arguments (might be deprecated again in the future) #7475v2.0.2Compare Source
Enhancements:
__dir__instead of__FILE__when generating a gem withbundle gem(#6503)httpson externals links in the Bundler gemspec (#6721)did you meanlist for gem typos (#6739)bundle removewould crash with certain Gemfiles (#6768)bundle installto be a warning instead of an error (#6790)only_update_to_newer_versions(#6774)--deploymentsetting would fail (#6805)bundle updatecouldn't update & install a gem whenno_installwas set (abundle packageconfig) (#7078)bundle execon default gems (#6963)githubsource was not usinghttpsby default that we mentioned in the 2.0 release (#7182)rake releasewas not outputting the message to users asking for a 2fa token (#7199)Documentation:
BUNDLE_PATH_RELATIVE_TO_CWDenv var (#6751)https(#6935)v2.0.1Bug fixes:
>= 2.5.0(#6867)v2.0.0No changes.
v1.17.3Compare Source
Bug fixes:
bundle clean(#6829, @colby-swandale)Documentation:
bundle removecommand to the main Bundler manual pagev1.17.2Compare Source
v1.17.1Compare Source
Pathnames toStrings before sorting them, fixing #6760 and #6758 (#6761, @alexggordon)v1.17.0Compare Source
No changes.
v1.16.6Compare Source
Enhancements:
bundle addthat's already in the bundle (#6341, @agrim123)bundle gemgemspec template (@walf443)Bug fixes:
BUNDLE_ONLY_UPDATE_TO_NEWER_VERSIONSwas set (#6529, @theflow)bundle add(@agrim123)bundle env(@voxik)Documentation:
--allflag inbundle update(@agrim123)bundle addin usage examples (@hdf1986)v1.16.5Compare Source
Enhancements:
Bug fixes:
RangeNotSatisfiableerror in Compact Index (@MaxLap)searchvariable inLazySpecification(@voxik)bundle update --patch(#6684, @segiddins)v1.16.4Compare Source
Enhancements:
Bug fixes:
Etcwas not loaded when getting the user's home dir (#6640, @colby-swandale)whileloop in path resolver helper (@ojab)Documentation:
bundle show [--paths]sorts results by name (@kemitchell)v1.16.3Compare Source
Features:
Bug fixes:
Configuration
📅 Schedule: Branch creation - "" (UTC), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.