diff --git a/configs/components/ruby-3.2.rb b/configs/components/ruby-3.2.rb index 0e164a10..f9e506ab 100644 --- a/configs/components/ruby-3.2.rb +++ b/configs/components/ruby-3.2.rb @@ -45,6 +45,26 @@ # Upgrade erb 4.0.2 -> 4.0.3.1, fixes CVE-2026-41316 pkg.apply_patch "#{base}/upgrade-erb-4.0.3.1.patch" + # Upgrade net-imap 0.3.9 -> 0.4.24, fixes CVE-2026-42246, other CVEs, and build issues. + pkg.add_source( + 'https://rubygems.org/downloads/net-imap-0.4.24.gem', + { + sum: '88289db8fd3f08aa8c661137810118e58fe309829e815e2ea8f3650662a6501b', + sum_type: 'sha256' + } + ) + pkg.configure do + [ + 'cp ../net-imap-0.4.24.gem gems/', + "sed -i.bak 's/^net-imap.*/net-imap 0.4.24 https:\\/\\/github.com\\/ruby\\/net-imap/' gems/bundled_gems", + # This next bit can be done via "make extract-gems", but that requires us + # to have a "baseruby" installed. + 'tar xf gems/net-imap-0.4.24.gem', + 'mkdir .bundle/gems/net-imap-0.4.24', + 'tar -C .bundle/gems/net-imap-0.4.24 -xzf data.tar.gz' + ] + end + #################### # ENVIRONMENT, FLAGS ####################