RubyGems slings patch at nasty redirect trojan holes

Could affect millions

Get patching: new vulns in the RubyGems developer distribution platform could expose millions of users to malicious redirects.

The hole (CVE-2015-3900) since patched means clients could be pushed to Gem severs hosting malicious content even if HTTPS is employed.

Attackers further benefited since RubyGems Gems Server Discovery did not validate if DNS replies are from the same security domain as gem sources. Gems are used in Ruby libraries for software development and distribution and are pushed out to servers for user installation.

Trustwave security bod Jonathan Claudius says some 438 million installations could be affected, and argue that gems should be signed to validate integrity. None of the top 10 gems including Rails and JSON are signed.

"[The] Gem Server Discovery functionality uses a DNS SRV request for finding a gem server [and] does not require that DNS replies come from the same security domain as the original gem source, allowing arbitrary redirection to attacker controlled gem servers," Claudius says.

"CVE-2015-3900 allows an attacker to redirect a RubyGem client that is using HTTPS to an attacker-controlled gem server. This effectively bypasses HTTPS verification on the original HTTPS gem source allowing an attacker to force the user to install malicious/trojanised gems.

"We demonstrated that even if you are using signed gems, by using CVE-2015-3900, you must be using the HighSecurity trust policy or gems can still be trojaned in transit due to a signing downgrade attack."

The research team which included OpenDNS wrote a gem trojan service to demonstrate how trojans could be sent while users were installing gems.

Users should upgrade to 2.4.8 to apply the fix. ®

Similar topics

Other stories you might like

Biting the hand that feeds IT © 1998–2021