We investigate, both experimentally and theoretically, the velocity and shape of bubbles that rise in a vertical cell with a rectangular cross-section due to buoyancy. The shorter length of the cross-section is comparable to, and the longer length is larger than, the capillary length. This geometry allows us to confine the bubble in two lateral directions, where the bubble is strongly confined by the front and back walls of the cell, and weakly confined by the side walls. Due to this double confinement, one lateral dimension of the bubble is comparable to, but the other lateral and vertical dimensions are larger than, the capillary length. This combination of length scales results in the distinct behavior described in the present study. Our focus here is on the dynamics in the viscous regime, in which buoyancy acts as the driving force for the vertical motion, which is opposed by viscous drag. We have successfully established simple laws for the velocity and shape of the doubly confined bubbles, which lead to a scaling law for the viscous drag acting on the bubble. It is shown that the downward flow around the bubble is essential to the dynamics in this regime. Confocal imaging on submillimeter scales reveals velocity profiles consistent with the present theory. We explore how this doubly confined regime exhibits crossover to previously known scaling laws, and present a corresponding phase diagram. By using a simple velocity transformation, we show the behavior of rising bubbles in the present study corresponds to, and leads to a deeper understanding of, certain types of viscous fingering.