An attack on NATO is an attack on its allies.
Until it’s not.
Not an attack on an extraterritorial expeditionary force. Afghanistan harbored the organization responsible for 9/11 and the U.S. invoked Article 5 ("An attack on one is an attack on all.") 9/11 was an attack on U.S. soil.