Confederations Cup scenarios: Who can advance to knockout stage?

All eight teams are two games into the Confederations Cup group stage, but not one team has punched its ticket into the knockout phase just yet.
The four favorites–Germany, Chile, Portugal and Mexico–are all in strong positions to go through, but host Russia and upstarts Cameroon and Australia remain alive entering this weekend's finales, with New Zealand the only team eliminated already. If 2009 taught us anything, it's that you can't rule out the incredible: For the USA to advance, it needed to overcome a six-goal gap in differential while beating Egypt and needing Brazil to top Italy, and that's the exact scenario that played out.
That being said, here are the scenarios for each of the remaining teams in contention to secure a place in the knockout stage:
GROUP A
So, after two match days in Group A...#MEX 🇲🇽 - 4⃣#POR 🇵🇹 - 4⃣#RUS 🇷🇺 - 3⃣#NZL 🇳🇿 - 0⃣ #ConfedCup pic.twitter.com/S6Psr13Wew
— FIFA (@FIFAcom) June 21, 2017
Mexico: Advances with a win or draw vs. Russia.
Portugal: Advances with a win over New Zealand; Can advance with a draw, should Russia not beat Mexico.
Russia: Advances with a win over Mexico; Can advance with a draw and New Zealand win over Portugal in which Russia winds up edging Portugal via tiebreaker.
New Zealand: Eliminated from contention.
Confederations Cup curse? Winning World Cup tune-up has been a bad omen for all
GROUP B
Going into the last round of fixtures, it is all to play for in Group B...
— FIFA (@FIFAcom) June 22, 2017
Sunday:#CHIAUS 🇨🇱🇦🇺#GERCMR 🇩🇪🇨🇲#ConfedCup pic.twitter.com/RIX1U3M1f4
Chile: Advances with a win or draw vs. Australia.
Germany: Advances with a win or draw vs. Cameroon.
Australia: Advances with a win of two goals or more vs. Chile
Cameroon: Advances with a win of three goals or more vs. Germany.
