An investigation is made of the three-dimensional linear stability of the Stokes layer generated within a fluid contained inside a long oscillating cylinder. Both longitudinal and torsional vibrations are examined and the system of disturbance equations derived using Floquet theory are solved using pseudospectral methods. Critical parameters for instability are obtained for an extensive range of pipe radii and longitudinal and azimuthal wavenumbers. For sufficiently small pipe diameters, three-dimensional perturbations are sometimes found to be more unstable than their two-dimensional counterparts. In contrast, at larger radii, the three-dimensional disturbance modes are less important and the two-dimensional versions are expected to be observed in practice. These results imply constraints on experiments that are designed to exhibit shear modes in oscillatory flow.