  Galactic cosmic rays (CR) are particles presumably accelerated in supernova
remnant shocks that propagate in the interstellar medium up to the densest
parts of molecular clouds, losing energy and their ionisation efficiency
because of the presence of magnetic fields and collisions with molecular
hydrogen. Recent observations hint at high levels of ionisation and at the
presence of synchrotron emission in protostellar systems, which leads to an
apparent contradiction. We want to explain the origin of these CRs accelerated
within young protostars as suggested by observations. Our modelling consists of
a set of conditions that has to be satisfied in order to have an efficient CR
acceleration through diffusive shock acceleration. We analyse three main
acceleration sites, then we follow the propagation of these particles through
the protostellar system up to the hot spot region. We find that jet shocks can
be strong accelerators of CR protons, which can be boosted up to relativistic
energies. Other promising acceleration sites are protostellar surfaces, where
shocks caused by impacting material during the collapse phase are strong enough
to accelerate CR protons. In contrast, accretion flow shocks are too weak to
efficiently accelerate CRs. Though CR electrons are weakly accelerated, they
can gain a strong boost to relativistic energies through re-acceleration in
successive shocks. We suggest a mechanism able to accelerate both CR protons
and electrons through the diffusive shock acceleration mechanism, which can be
used to explain the high ionisation rate and the synchrotron emission observed
towards protostellar sources. The existence of an internal source of energetic
particles can have a strong and unforeseen impact on the ionisation of the
protostellar disc, on the star and planet formation processes, and on the
formation of pre-biotic molecules.
