While the Commission has said that unilateral moves will not be tolerated, it has not yet specified what measures it would take against Poland and Hungary.
"In such challenging times, it is crucial to coordinate and align all decisions within the EU," its spokesperson said in a statement.
Most Ukrainian grain is exported via the Black Sea, but Russia's invasion last year disrupted export routes and resulted in large quantities of the grain ending up in central Europe.
A deal with Russia, brokered by the UN and Turkey, allows Ukraine to continue exporting by sea - but Ukraine accuses Russia of slowing the process with over-zealous inspections.