I would think it's not sterile but probably sanitary enough. I spray with starsan to quell any worries. I've not had an infection that could ever be traced back to using foil
I don't spray foil that is used as a lid, it doesn't come in contact with the wort. I spray foil that I use on starters or that I use to lay things on that might touch beer