In this paper, an approximate semi-analytical approach is developed for determining the first-passage probability of randomly excited linear and lightly nonlinear oscillators endowed with fractional derivative elements. The amplitude of the system response is modeled as one-dimensional Markovian process by employing a combination of the stochastic averaging and the statistical linearization techniques. This leads to a backward Kolmogorov equation which governs the evolution of the survival probability of the oscillator. Next, an approximate solution of this equation is sought by resorting to a Galerkin scheme. Specifically, a convenient set of confluent hypergeometric functions, related to the corresponding linear oscillator with integer-order derivatives, is used as orthogonal basis for this scheme. Applications to the standard viscous linear and to nonlinear (Van der Pol and Duffing) oscillators are presented. Comparisons with pertinent Monte Carlo simulations demonstrate the reliability of the proposed approximate analytical solution.