Can someone explain what the backdoor could do? It's exposing some session token that someone could then use to login an account on some website that used this gem?
This means the backdoor is fully generic and nobody can describe the damage, if any, that has been done.
The only saving grace is the code will run with the privileges of the ruby interpreter, constrained to the process environment of same.