We study the properties of a D6-brane probe in the ABJM background with smeared massless dynamical quarks in the Veneziano limit. Working at zero temperature and non-vanishing charge density, we show that the system undergoes a quantum phase transition in which the topology of the brane embedding changes from a black hole to a Minkowski embedding. In the unflavored background the phase transition is of second order and takes place when the charge density vanishes. We determine the corresponding critical exponents and show that the scaling behavior near the quantum critical point has multiplicative logarithmic corrections. In the background with dynamical quarks the phase transition is of first order and occurs at non-zero charge density. In this case we compute the discontinuity of several physical quantities as functions of the number $N_f$ of unquenched quarks of the background.