The effect of surfactant on the breakup of a viscous filament, initially at rest, surrounded by another viscous fluid is studied using linear stability analysis. The role of the surfactant is characterized by the elasticity number – a high elasticity number implies that surfactant is important. As expected, the surfactant slows the growth rate of disturbances. The influence of surfactant on the dominant wavenumber is less trivial. In the Stokes regime, the dominant wavenumber for most viscosity ratios increases with the elasticity number; for filament to matrix viscosity ratios ranging from about 0.03 to 0.4, the dominant wavenumber decreases when the elasticity number increases. Interestingly, a surfactant does not affect the stability of a filament when the surface tension (or Reynolds) number is very large.