Malonic ester contains an active methylene group and two hydrogen atoms of active methylene group are easily replaced by alkyl and acyl groups in the presence of strong base. The carbonation intermediate formed, makes SN2 attack on alkyl or acyl groups.