I've had it bug once, nothing serious at all. On my orc, who had no one-handed weapon skill, he couldn't escape solo with the weapons provided, so I had to get the help of the other prisoners to escape, but killed them all the moment I got my equipment back from them. Most NPCs think that I still escaped with them, and they performed their massacres.
If you have a high one-handed, sneak, or magic skill, it should be cake to escape. Just escape normally by:
Spoiler
Killing Madanach, looting the note and key, and leaving through the designated tunnel.