After drawing their second Group A match, El Tri will need to avoid defeat against Croatia to make the knockout rounds.
Ivica Olic opened the scoring for Croatia in the 34th minute, with Ivan Perisic and Mario Mandzukic (twice) netting the second half goals, after Alexandre Song was sent off for Cameroon five minutes from halftime.
The result means Brazil still leads the group on four points, with Mexico in second place on goal difference.
Croatia moves into third following its victory over the African side, but remains one point behind Mexico.
Mexico against Croatia will take place in Recife on Monday (6 p.m. ET), with Croatia only advancing with a victory.
Brazil needs only one point in its final game against Cameroon to advance and would qualify for the Round of 16 regardless of its own result should Mexico get a point or more against Croatia.
El Tri has made the Round of 16 stage at each of the last five World Cup and is yet to concede a goal at Brazil 2014, although it has only scored once.
Mexico has played Croatia once before in a World Cup, with Mexico winning 1-0 at the group stage in 2002.