Bug 2035260 (CVE-2021-43809)

Summary: CVE-2021-43809 rubygem-bundler: unexpected code execution in Gemfiles
Product: [Other] Security Response Reporter: Marian Rehak <mrehak>
Component: vulnerabilityAssignee: Nobody <nobody>
Status: NEW --- QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: besser82, caswilli, gtucker, jaruga, jvasik, kaycoth, mo, rblanco, ruby-maint, shreyankg, s, sthirugn, strzibny, vkrizan, vmugicag, vondruch, vsroka
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: rubygem-bundler 2.2.33 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 2035261, 2035355, 2214203, 2214204, 2214205    
Bug Blocks: 2035262    

Description Marian Rehak 2021-12-23 12:27:27 UTC
Crafted directory containing a `Gemfile` file that declares a dependency that is located in a Git repository 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.

Upstream Advisory:

https://github.com/rubygems/rubygems/commit/a4f2f8ac17e6ce81c689527a8b6f14381060d95f
https://github.com/rubygems/rubygems/security/advisories/GHSA-fj7f-vq84-fh43

Comment 1 Marian Rehak 2021-12-23 12:27:42 UTC
Created rubygem-bundler tracking bugs for this issue:

Affects: fedora-all [bug 2035261]

Comment 5 Jun Aruga 2022-01-03 12:08:53 UTC
Just for your information. Here is a upstream ticket about this CVE.

Ruby 2.6.9, bundler 1.17.2 and CVE-2021-43809
https://bugs.ruby-lang.org/issues/18431

Comment 6 Vít Ondruch 2022-02-21 11:03:42 UTC
@Marian it seems you have linked wrong commit. The correct reference (also referenced in Bundler changelog [2]) should be [1].



[1]: https://github.com/rubygems/rubygems/pull/5142
[2]: https://github.com/rubygems/rubygems/commit/0fad1ccfe9dd7a3c5b82c1496df3c2b4842870d3

Comment 15 errata-xmlrpc 2025-05-14 02:14:03 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

Via RHSA-2025:7539 https://access.redhat.com/errata/RHSA-2025:7539