Melts formed by small degrees of partial melting are rich in volatiles and may reach critical supersaturation during slow ascent or due to partial crystallization. Following nucleation, the bubbles grow and, if magma volume is confined, the surrounding walls deform and pressure increases. If pressurization is large enough and fast enough, the surrounding rock may fracture. We performed experiments on the nucleation of CO2 bubbles in mafic alkaline melt saturated at 1.5 GPa and 1350 °C and found that supersaturation of 100-300 MPa is needed to initiate nucleation. Modeling bubble growth, and accounting for compressibility of melt and the surrounding host rocks, we found that in alkaline basalts about 30% of the critical supersaturation pressure stresses the walls. Kimberlites, with stronger dependence of solubility on pressure may recover about 45% of the supersaturation pressure. This is more than enough to cause brittle failure of the wall rocks, if pressurization is fast enough. The pressurization time scale is of the order of seconds to days, depending mostly on the diffusivity of CO2 and on the bubble number density. This time scale is much shorter than the Maxwell relaxation time of the mantle rocks, or the characteristic time for flow back towards the source. Thus the host rocks are expected to respond elastically and fail in a brittle mode. Such event can form xenoliths and initiate dikes that allow the fast transport of the magma and its xenoliths to the surface. This mechanism may also explain the limited depth range spanned by most of the xenoliths sampled by individual eruptions in many localities.