Consider the following snippet:
I had a similar issue with overflowing images in a flex wrapper.
Adding either flex-basis: 100%; or flex: 1; to the overflowing child fixed worked for me.
flex-basis: 100%;
flex: 1;