Hernandez won a penalty on his 100th international appearances, but he had to be withdrawn after 51 minutes.
Mexico face Poland in another friendly on Monday.
The possible injury will worry West Ham's new boss David Moyes as he continues preparations for Sunday's Premier League game at Watford.
Hernandez is the Hammers' top scorer in the Premier League this season, with four goals in 11 appearances, more than one third of their overall goals haul.
After six losses in their first 11 games, West Ham sit 18th in the table.