The problem of detecting an abrupt change in the distribution of an arbitrary, sequentially observed, continuous-path stochastic process is considered and the optimality of the CUSUM test is established with respect to a modified version of Lorden's criterion. We apply this result to the case that a random drift emerges in a fractional Brownian motion and we show that the CUSUM test optimizes Lorden's original criterion when a fractional Brownian motion with Hurst index H adopts a polynomial drift term with exponent H+1/2.