The present invention refers to a composition comprising cucurbitacins and their glucoside derivatives, wherein cucurbitacins D, I, L and A and their glucoside derivatives are present, as a whole, in terms of percentage by weight, in an amount greater than 25% of the total weight of the cucurbitacins and their glucoside derivatives, and wherein cucurbitacins B, E and the derivative of cucurbitacin E, ecballic acid, are each present at a concentration below 2.5% of the total weight of the cucurbitacins and their glucoside derivatives, for its use in the treatment or prevention of hair loss.