Six strangers wake up inside a three-dimensional maze of interlocking cubes. None of them know how they got there or why they have been chosen. Some cubes are safe, but others are booby trapped. The only clue is a cryptic number stenciled on each of the six doors.
Alderson wakes up in an unknown location—a cube-shaped room with six doors, one on each face of the cube. After examining his surroundings, he begins frantically opening the doors, one by one, only to find that the only differences in the rooms were their colors. After exploring his options, he enters an amber-colored room. After he walks to the center of the room, he hears a shink and finds himself cut into several pieces which fall apart slowly, revealing a giant metal grill that folds up into the ceiling. Yes, shit has just gotten real.
Elsewhere in the cube (possibly later, although it isn't mentioned), Worth wakes up. After performing the same actions the late Alderson did, Worth hears someone entering his cube. Soon, Quentin, Worth, Holloway, Rennes and Leaven meet. None of them know where they are or why they are here, so they have no option but to work together to find a way out of the labyrinth. Rennes has already noticed that some rooms contain traps, and he has been navigating the rooms by throwing one of his boots into the rooms to test the traps, which, due to his "still being alive" has been working out pretty well for him. The group tests the rooms until they find one that is trap-free, and they head out.
Progress through the cube is slow, but Leaven notices that each room has a small metal plaque with a set of numbers at each door. The group continues until Rennes gets his shit sprayed with acid and his face melts the fuck off. The group guesses that Rennes's techniques weren't the greatest, and that there were possibly electrochemical sensors in the room. They realize that they can't keep throwing boots to test for traps.
Quentin suggests that each remaining victim shares his or her background so they can try to figure out why they were chosen to be in the cube. Leaven mentions that she studies mathematics, and that she believes that the numbers she saw are an indicator of the trapped status of each room. Leaven thinks that if one of the numbers are prime, the room is trapped. At that point, she examines every room before the group enters.
As they continue to navigate the cube, Leaven's job is to decipher the numbers. In one of the cubes, the group stumbles upon a sixth member, Kazan, who appears to be mentally challenged (think Rain Man-style crazy). Despite the pleas of several group members, Holloway insists they bring him along.
The group begins to discuss the cube and their purpose within it. Holloway provides some plausible ideas, but Quentin claims they are conspiracy theories. Holloway counters, calling Quentin naive. In his anger, Quentin jumps into a room that was supposed to be safe and narrowly escapes being sliced into hundreds of pieces by rotating razor wires by running back. This disproves Leaven's theory of the prime numbers. Quentin yells at everyone and focuses his anger on Kazan, of whom he has grown extremely irritated with. The group rests while Leaven returns to figuring out what the fuck these mystery numbers mean.
With the use of some careful wordplay, Quentin tricks Worth into revealing that he helped design the shell of the cube. After talking with him, he reveals the size of the cube structure. The others begin to distrust Worth. Leaven suggests that the numbers could be some kind of encoded cartesian coordinates representing the positions of the rooms within a cube. After this revelation, they take off toward the edge of the cube.
Blue cube with booby trap.
After reaching the edge of the cube, the open a door that reveals a seemingly-infinite black void. They conclude that there must be a gap between the exit and the outer shell. The group decides to investigate the exterior, so they fashion a rope out of their clothes. Holloway volunteers to swing out on the rope and investigate their surroundings. As she is hanging outside of the cube, the cube begins to shudder and shake, and Holloway nearly falls. Quentin reaches out and catches her, but then drops her. He tells the others she simply slipped from his grasp.
Again, they rest, but Quentin begins to go a bit crazy-sauce. He carries Leaven off to another cube and tries to convince her to leave with him. He then tries to get some nasty-nasty goin' on, but she tells him no. Once he gets shot down, he goes wild, smacking her in her back-sassing face. Worth and Kazan both wake up and come in to save her. Quentin tells the others of how he murdered Holloway. He then shoves Worth through a door on the floor, and he lands right next to Rennes's dead body. They're shocked, believing they've been going in circles; however, they quickly notice that the acid room that killed Rennes isn't adjacent to the room his body was in, leading them to believe that the rooms were moving. They realize that the shaking that nearly killed Holloway was the rooms moving.
They guess that there must be a room that bridges the void and allows people to enter (and possibly exit) the cube. They calculate the position of the bridge room and head out. They also realize that the traps aren't only prime numbers, but also powers of prime numbers. Leaven confesses that she can't figure out these numbers quickly enough to make it to the bridge room in time. Then, Kazan begins to quickly, mentally decipher if rooms were safe or not. He was an autistic savant, and he could help them escape the cube.
White cube. Also features a man.
They being to quickly navigate the cube, heading toward the bridge room. It wound up that the room where they met—the very first room—was the room that lead to freedom. Worth devises a plan to prevent Quentin from leaving, thinking him dangerous. Worth and Quentin fight, and Worth drops Quentin down into a room, leaving him to die.
The bridge room eventually comes, and when they open the door, a blinding white light fills the room. Worth and Leaven share a moment as he explains that he won't be coming with her. As they embrace, she is stabbed in the back by Quentin (who has made it to their room) with a broken door handle. Kazan quickly climbs through the door when Quentin stabs Worth. As Quentin goes to leave, Worth grabs him, holding him between the door and the exit while the room shifts. Quentin is cut in half, and Worth lies down to die.
Kazan stumbles out into the blinding light as the movie ends.