Yes Ammar this is typically larva of some species belonging to Curculionidae family but could be any species from this photo it is impossible to determined because of more similarities between species larvae
Is a Curculionidae: Scolytinae larva. There are several reports of black timber bark beetles pests of Malus silvestris in Europe like Xylosandrus germanus and Xylosandrus crassiusculus. You must check with the adult to confirm. It is not Bostrichidae. Bostrichidae larva are elongated with the Prothorax typically more enlarged than either meso- or metathorax.
Considering the amount of larvae in your piece of Malus, I'm almost certain there must be some adults in it. That would be of great help to get a species-level identification.