XP is insecure, unless it is totally isolated from the network, the likely issue is something you get on your Windows 10 machines may not be able to execute properly, but if it can copy itself from there over to the XP machine where it can execute using an unpatched vulnerability and then spread from there.