The milk was being kept in a freezer at Wishaw General Hospital, North Lanarkshire, that was warmer than the recommended temperature.
The issue was uncovered when a team from the Healthcare Environment Inspectorate (HEI) visited the hospital in June. Hospitals store breast milk to feed sick and premature babies.
The inspectors said: "We were concerned about the quality and safety of the milk."
They found that. while the freezer should have been -18°C to -20°C, the temperature gauge was -13°C at the time, with logs showing it had been fluctuating between -13°C to -15°C in the previous weeks.
Inspectors also said staff were "unsure of the correct storage temperature for frozen breast milk".
Because of their concerns, the inspectors raised the matter with a senior nurse for "immediate action". The next day hospital managers confirmed changes had been made, including placing an extra thermometer inside the freezer and obtaining specialist guidance on storage conditions and temperature monitoring.
Iain Wallace, medical director at NHS Lanarkshire, said: "Processes for storing breast milk have been reviewed and brought to staff's attention."
Overall, the inspectors said there was a "good standard of cleanliness" at the hospital and that wards were "well maintained and in a good state of repair".