Improving the running safety and reducing the risk of derailments are the key objectives in the assessment of the running characteristics of railway vehicles. The present study of the safety against derailment is focused on the effect of wheelset hunting on the derailment coefficient and, especially, how it is reflected in the power spectral density (PSD) of . The lateral Y and vertical Q forces at the wheel/rail contact are obtained in numerical simulations for a four-axle railway vehicle moving at a constant velocity along a tangent track with random geometrical irregularities. The PSD of , calculated as a function of spatial frequency, is found to have a characteristic structure with three peaks for the leading wheelsets and one peak for the trailing wheelsets of the front and rear bogies. The positions of the PSD maxima remain unchanged with increasing ride velocity, while their magnitudes and shapes evolve. One of the PSD peaks occurs for all wheelsets at the same spatial frequency corresponding to the wheelset hunting, while an additional peak at the double hunting frequency is found for the leading wheelsets. Such a peak structure is also found in the PSD of determined in simulations with modified parameters of the vehicle primary suspension and for different track sections. The peak at the double hunting frequency is shown, by a detailed analysis of the contact forces, the flange angles and their PSDs, to result from the nonlinear geometry of the wheel/rail contact leading to the second-harmonic term in . The emergence of this peak is also closely related to the phase difference between the hunting oscillations of the wheelset lateral displacement and the oscillations of its yaw angle, for which the difference is significantly smaller for the leading wheelset than for the trailing one. Finally, the effect of wheelset hunting is also shown to manifest itself in the strong dependence of the running average of , which is used in the railway technical safety standards for the assessment of the safety against derailment (with the Nadal criterion), on the applied window width.