We prove a maximum principle for mild solutions to stochastic evolution equations with (locally) Lipschitz coefficients and Wiener noise on weighted $L^2$ spaces. As an application, we provide sufficient conditions for the positivity of forward rates in the Heath-Jarrow-Morton model, considering the associated Musiela SPDE on a homogeneous weighted Sobolev space.