In this paper, the problem of controlling the attitude of a CubeSat in low Earth orbit using only the environmental torques is considered. The CubeSat is equipped with a Drag Maneuvering Device (DMD) that enables the spacecraft to modulate its experienced aerodynamic and gravity gradient torques. An adaptive controller is designed to achieve attitude tracking of the spacecraft in the presence of uncertain parameters such as the atmospheric density, drag and lift coefficients, and the time-varying location of the Center of Mass (CoM). The proposed controller also accounts for modeling inaccuracy of the inertia matrix of the spacecraft. A Lyapunov-based analysis is used to prove that the quaternion-based attitude trajectory tracking error is uniformly ultimately bounded. The designed controller is also examined through numerical simulations for a spacecraft with time-varying uncertain drag, lift coefficients and CoM location parameters and the NRLMSISE-00 model for the atmospheric density.