Localized buckling modes in the axially compressed strut on a distributed-spring elastic foundation with a softening quadratic nonlinearity are numerically calculated based on a modified Petviashvili method in the spatial frequency domain. As the load decreases (increases), the maximum displacement of the corresponding localized buckling mode increases (decreases) and its width decreases (increases). Then, under the influence of longitudinal and transverse perturbations, stabilities of these localized buckling modes are numerically investigated. The adopted numerical method is the spatial Fourier transform in space and the finite difference method in time. For initial positive longitudinal perturbations, localized buckling modes are unstable showing focusing-type finite-time blowup singularities. For initial negative perturbations, localized buckling modes are unstable and become dispersed showing small-amplitude oscillations. For initial transverse perturbations, localized buckling modes are unstable and are transformed into three-dimensional locally confined modes, finally showing finite-time blowup singularities.