Afghanistan allowed a large terrorist organization to freely operate inside its country for years, that attacked the US starting in 93.
North Korea invaded a US ally, and United Nations responded, sending troops from many countries. If you dont want to count people who died in South Korea from DPRK forces, then fine, we will count their attack on the USS Pueblo in international waters.
11 Dec 41 - Italy declares war on US
Germany did send its ships across the atlantic and US sailors did die before we were officially in WW2