If it is coming out of the cloaca (the place where they poo and pee), and it looks like 2 worms, it could be their genitaliaes (gliders possess 2 genitaliaes, that's why I said 2). If it doesn't retract, and starts turning a very light pink, white or black, your glider could get very sick (it can end up falling off, getting infected, etc). Apply K-Y to help him getting it retracted; if even so it doesn't retract, you need to take him to a vet.
Yesterday you posted about his nail, if it ripped off he could be in a lot of pain, not counting the fact that it could get infected. All of this combine can lead to self mutilation, which is harder to treat, please take him to a vet as soon as possible
Another possibility if it is something combined with his poop, is that it could be parasites, the only way to confirm, again, is to go to the vet and get a fecal test.