Patchwire CVEs, their patch status, and feeds to follow them

CVE-2021-43809

Fixed in a distro release EPSS 3%CVSS 6.7

`Bundler` is a package for managing application dependencies in Ruby. In `bundler` versions before 2.2.33, when working with untrusted and apparently harmless `Gemfile`'s, it is not expected that they lead to execution of external code, unless that's explicit in the ruby code inside the `Gemfile` itself. However, if the `Gemfile` includes `gem` entries that use the `git` option 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 the commands, 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 `Gemfile` file, it can contain any character, including a leading dash. To exploit this vulnerability, an attacker has to craft a directory containing a `Gemfile` file 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 URL will 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. This vulnerability can lead to Arbitrary Code Execution, which could potentially lead to the takeover of the system. However, the exploitability is very low, because it requires a lot of user interaction. 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. Regardless of whether users can upgrade or not, they should review any untrustred `Gemfile`'s before running any `bundler` commands that may read them, since they can contain arbitrary ruby code.

Published 2021-12-08 · CVE record · OSV

Products: rubygems

Fixed upstream

EcosystemPackageFixed in
RubyGemsbundler2.2.33

Distro releases

ReleasePackageFixed in
AlmaLinux 8ruby2.5.9-114.module_el8.10.0+3991+5e651d4e
AlmaLinux 8ruby-devel2.5.9-114.module_el8.10.0+3991+5e651d4e
AlmaLinux 8ruby-doc2.5.9-114.module_el8.10.0+3991+5e651d4e
AlmaLinux 8ruby-irb2.5.9-114.module_el8.10.0+3991+5e651d4e
AlmaLinux 8ruby-libs2.5.9-114.module_el8.10.0+3991+5e651d4e
AlmaLinux 8rubygem-abrt0.3.0-4.module_el8.5.0+2625+ec418553
AlmaLinux 8rubygem-abrt-doc0.3.0-4.module_el8.10.0+3871+342e2c2f
AlmaLinux 8rubygem-bigdecimal1.3.4-114.module_el8.10.0+3991+5e651d4e
AlmaLinux 8rubygem-bson4.3.0-2.module_el8.5.0+2625+ec418553
AlmaLinux 8rubygem-bson4.3.0-2.module_el8.6.0+3170+4b08f9d4
AlmaLinux 8rubygem-bson4.3.0-2.module_el8.5.0+259+8cec6917
AlmaLinux 8rubygem-bson-doc4.3.0-2.module_el8.5.0+2625+ec418553
AlmaLinux 8rubygem-bundler1.16.1-5.module_el8.10.0+3991+5e651d4e
AlmaLinux 8rubygem-bundler-doc1.16.1-5.module_el8.10.0+3991+5e651d4e
AlmaLinux 8rubygem-did_you_mean1.2.0-114.module_el8.10.0+3991+5e651d4e
AlmaLinux 8rubygem-io-console0.4.6-114.module_el8.10.0+3991+5e651d4e
AlmaLinux 8rubygem-json2.1.0-114.module_el8.10.0+3991+5e651d4e
AlmaLinux 8rubygem-minitest5.10.3-114.module_el8.10.0+3991+5e651d4e
AlmaLinux 8rubygem-mongo2.5.1-2.module_el8.5.0+2625+ec418553
AlmaLinux 8rubygem-mongo-doc2.5.1-2.module_el8.5.0+2625+ec418553
AlmaLinux 8rubygem-mysql20.4.10-4.module_el8.5.0+259+8cec6917
AlmaLinux 8rubygem-mysql20.4.10-4.module_el8.5.0+2625+ec418553
AlmaLinux 8rubygem-mysql20.4.10-4.module_el8.6.0+3170+4b08f9d4
AlmaLinux 8rubygem-mysql2-doc0.4.10-4.module_el8.5.0+2625+ec418553
AlmaLinux 8rubygem-net-telnet0.1.1-114.module_el8.10.0+3991+5e651d4e
AlmaLinux 8rubygem-openssl2.1.2-114.module_el8.10.0+3991+5e651d4e
AlmaLinux 8rubygem-pg1.0.0-3.module_el8.9.0+3635+c6f99506
AlmaLinux 8rubygem-pg-doc1.0.0-3.module_el8.9.0+3635+c6f99506
AlmaLinux 8rubygem-power_assert1.1.1-114.module_el8.10.0+3991+5e651d4e
AlmaLinux 8rubygem-psych3.0.2-114.module_el8.10.0+3991+5e651d4e
AlmaLinux 8rubygem-rake12.3.3-114.module_el8.10.0+3991+5e651d4e
AlmaLinux 8rubygem-rdoc6.0.1.1-114.module_el8.10.0+3991+5e651d4e
AlmaLinux 8rubygem-test-unit3.2.7-114.module_el8.10.0+3991+5e651d4e
AlmaLinux 8rubygem-xmlrpc0.3.0-114.module_el8.10.0+3991+5e651d4e
AlmaLinux 8rubygems2.7.6.3-114.module_el8.10.0+3991+5e651d4e
AlmaLinux 8rubygems-devel2.7.6.3-114.module_el8.10.0+3991+5e651d4e
Alpine 3.15ruby-bundler2.2.33-r0
Arch Linuxruby-bundlerno fix
Debian 11rubygems3.2.5-2+deb11u1
Debian 12rubygems3.3.5-1
Debian 13rubygems3.3.5-1
Debian 14rubygems3.3.5-1
Red Hat Enterprise Linux 8ruby0:2.5.9-114.module+el8.10.0+23088+750dc6ca
Red Hat Enterprise Linux 8ruby-debuginfo0:2.5.9-114.module+el8.10.0+23088+750dc6ca
Red Hat Enterprise Linux 8ruby-debugsource0:2.5.9-114.module+el8.10.0+23088+750dc6ca
Red Hat Enterprise Linux 8ruby-devel0:2.5.9-114.module+el8.10.0+23088+750dc6ca
Red Hat Enterprise Linux 8ruby-doc0:2.5.9-114.module+el8.10.0+23088+750dc6ca
Red Hat Enterprise Linux 8ruby-irb0:2.5.9-114.module+el8.10.0+23088+750dc6ca
Red Hat Enterprise Linux 8ruby-libs0:2.5.9-114.module+el8.10.0+23088+750dc6ca
Red Hat Enterprise Linux 8ruby-libs-debuginfo0:2.5.9-114.module+el8.10.0+23088+750dc6ca
Red Hat Enterprise Linux 8rubygem-abrt0:0.3.0-4.module+el8.10.0+22021+135c76a8
Red Hat Enterprise Linux 8rubygem-abrt-doc0:0.3.0-4.module+el8.10.0+22021+135c76a8
Red Hat Enterprise Linux 8rubygem-bigdecimal0:1.3.4-114.module+el8.10.0+23088+750dc6ca
Red Hat Enterprise Linux 8rubygem-bigdecimal-debuginfo0:1.3.4-114.module+el8.10.0+23088+750dc6ca
Red Hat Enterprise Linux 8rubygem-bson0:4.3.0-2.module+el8.9.0+19193+435404ae
Red Hat Enterprise Linux 8rubygem-bson-debuginfo0:4.3.0-2.module+el8.9.0+19193+435404ae
Red Hat Enterprise Linux 8rubygem-bson-debugsource0:4.3.0-2.module+el8.9.0+19193+435404ae
Red Hat Enterprise Linux 8rubygem-bson-doc0:4.3.0-2.module+el8.9.0+19193+435404ae
Red Hat Enterprise Linux 8rubygem-bundler0:1.16.1-5.module+el8.10.0+23088+750dc6ca
Red Hat Enterprise Linux 8rubygem-bundler-doc0:1.16.1-5.module+el8.10.0+23088+750dc6ca
Red Hat Enterprise Linux 8rubygem-did_you_mean0:1.2.0-114.module+el8.10.0+23088+750dc6ca
Red Hat Enterprise Linux 8rubygem-io-console0:0.4.6-114.module+el8.10.0+23088+750dc6ca
Red Hat Enterprise Linux 8rubygem-io-console-debuginfo0:0.4.6-114.module+el8.10.0+23088+750dc6ca
Red Hat Enterprise Linux 8rubygem-json0:2.1.0-114.module+el8.10.0+23088+750dc6ca
Red Hat Enterprise Linux 8rubygem-json-debuginfo0:2.1.0-114.module+el8.10.0+23088+750dc6ca
Red Hat Enterprise Linux 8rubygem-minitest0:5.10.3-114.module+el8.10.0+23088+750dc6ca
Red Hat Enterprise Linux 8rubygem-mongo0:2.5.1-2.module+el8.9.0+19193+435404ae
Red Hat Enterprise Linux 8rubygem-mongo-doc0:2.5.1-2.module+el8.9.0+19193+435404ae
Red Hat Enterprise Linux 8rubygem-mysql20:0.4.10-4.module+el8.9.0+19193+435404ae
Red Hat Enterprise Linux 8rubygem-mysql2-debuginfo0:0.4.10-4.module+el8.9.0+19193+435404ae
Red Hat Enterprise Linux 8rubygem-mysql2-debugsource0:0.4.10-4.module+el8.9.0+19193+435404ae
Red Hat Enterprise Linux 8rubygem-mysql2-doc0:0.4.10-4.module+el8.9.0+19193+435404ae
Red Hat Enterprise Linux 8rubygem-net-telnet0:0.1.1-114.module+el8.10.0+23088+750dc6ca
Red Hat Enterprise Linux 8rubygem-openssl0:2.1.2-114.module+el8.10.0+23088+750dc6ca
Red Hat Enterprise Linux 8rubygem-openssl-debuginfo0:2.1.2-114.module+el8.10.0+23088+750dc6ca
Red Hat Enterprise Linux 8rubygem-pg0:1.0.0-3.module+el8.9.0+19193+435404ae
Red Hat Enterprise Linux 8rubygem-pg-debuginfo0:1.0.0-3.module+el8.9.0+19193+435404ae
Red Hat Enterprise Linux 8rubygem-pg-debugsource0:1.0.0-3.module+el8.9.0+19193+435404ae
Red Hat Enterprise Linux 8rubygem-pg-doc0:1.0.0-3.module+el8.9.0+19193+435404ae
Red Hat Enterprise Linux 8rubygem-power_assert0:1.1.1-114.module+el8.10.0+23088+750dc6ca
Red Hat Enterprise Linux 8rubygem-psych0:3.0.2-114.module+el8.10.0+23088+750dc6ca
Red Hat Enterprise Linux 8rubygem-psych-debuginfo0:3.0.2-114.module+el8.10.0+23088+750dc6ca
Red Hat Enterprise Linux 8rubygem-rake0:12.3.3-114.module+el8.10.0+23088+750dc6ca
Red Hat Enterprise Linux 8rubygem-rdoc0:6.0.1.1-114.module+el8.10.0+23088+750dc6ca
Red Hat Enterprise Linux 8rubygem-test-unit0:3.2.7-114.module+el8.10.0+23088+750dc6ca
Red Hat Enterprise Linux 8rubygem-xmlrpc0:0.3.0-114.module+el8.10.0+23088+750dc6ca
Red Hat Enterprise Linux 8rubygems0:2.7.6.3-114.module+el8.10.0+23088+750dc6ca
Red Hat Enterprise Linux 8rubygems-devel0:2.7.6.3-114.module+el8.10.0+23088+750dc6ca
Rocky Linux 8ruby0:2.5.9-114.module+el8.10.0+1979+815637df
Rocky Linux 8rubygem-abrt0:0.3.0-4.module+el8.9.0+1536+5f79634e
Rocky Linux 8rubygem-abrt0:0.3.0-4.module+el8.5.0+738+032c9c02
Rocky Linux 8rubygem-bson0:4.3.0-2.module+el8.9.0+1536+5f79634e
Rocky Linux 8rubygem-bundler0:1.16.1-5.module+el8.10.0+1979+815637df
Rocky Linux 8rubygem-mongo0:2.5.1-2.module+el8.9.0+1536+5f79634e
Rocky Linux 8rubygem-mysql20:0.4.10-4.module+el8.9.0+1536+5f79634e
Rocky Linux 8rubygem-pg0:1.0.0-3.module+el8.9.0+1536+5f79634e
SUSE Linux Enterprise Module for Basesystem 15 SP5rubygem-bundler1.16.1-150000.3.6.1
SUSE Linux Enterprise Module for Basesystem 15 SP6rubygem-bundler1.16.1-150000.3.6.1
SUSE Linux Enterprise Module for Basesystem 15 SP7rubygem-bundler2.2.34-150700.21.3.1
SUSE Linux Enterprise Server 15 SP2-LTSSrubygem-bundler1.16.1-150000.3.6.1
SUSE Linux Enterprise Server 15 SP3-LTSSrubygem-bundler1.16.1-150000.3.6.1
SUSE Linux Enterprise Server 15 SP4-LTSSrubygem-bundler1.16.1-150000.3.6.1
SUSE Linux Enterprise Server for SAP Applications 15 SP2rubygem-bundler1.16.1-150000.3.6.1
SUSE Linux Enterprise Server for SAP Applications 15 SP3rubygem-bundler1.16.1-150000.3.6.1
SUSE Manager Server 4.3rubygem-bundler1.16.1-150000.3.6.1
Ubuntu 16.04 LTSbundlerno fix
Ubuntu 20.04 LTSbundlerno fix
Ubuntu Pro 18.04 LTSbundlerno fix
openSUSE Leap 15.5rubygem-bundler1.16.1-150000.3.6.1