Maléfique(2003)

Four prisoners discover a handwritten book of black magic in their cell, and decide to use it to escape.