Can fruit fly larvae eat plastic?
As someone commented, it seems likely that this was just caused by a piece of fruit that had been accidentally left in the bag. It attracted fruit flies and for weeks they were reproducing.