In this work, using the effective-mass approximation within a variational approach, we have studied the behaviour of the binding and transition energies of a donor shallow impurity in a cylindrical GaAs–Ga0.6Al0.4As quantum well wire (QWW) as a function of the wire radius, the impurity position and the applied magnetic field. The QWW is of infinite length with a finite radial confining potential and the magnetic field is applied parallel to the wire axis. In our calculations we have considered the 1s-, 2p ± - and 3p ± -like impurity states. We have found that for the 1s-like state the impurity binding energy increases with the magnetic field for impurity positions close to the centre of the wire, but diminishes for on-edge impurities, highlighting the competition between the geometrical and magnetic confinement. Also, we have observed that the energy of the 2p ± - and 3p ± -like excited states is greater than the energy of the electron ground state without the presence of the impurity for small radius of the QWW, a result which is more pronounced for higher magnetic fields. Our results are in good agreement with previous theoretical reports, with lower binding and transition energies than those which use infinite confinement potential, as expected.