It is very unlikely that foxes will attack dogs or cats unless they feel cornered or threatened. Wild foxes are extremely timid and are naturally apprehensive of humans and their pets, so a fox will run away if a dog confronts it.