We have evaluated the electron capture rates on $^{20}\mathrm{Ne}$, $^{20}\mathrm{F}$, $^{24}\mathrm{Mg}$, and $^{24}\mathrm{Na}$ and the $\ensuremath{\beta}$ decay rates for $^{20}\mathrm{F}$ and $^{24}\mathrm{Na}$ at temperature and density conditions relevant for the late-evolution stages of stars with $M=8{M}_{\ensuremath{\bigodot}}$--12${M}_{\ensuremath{\bigodot}}$. The rates are based on recent experimental data and large-scale shell-model calculations. We show that the electron capture rates on $^{20}\mathrm{Ne}$ and $^{24}\mathrm{Mg}$ and the $^{20}\mathrm{F}$ and $^{24}\mathrm{Na}$ $\ensuremath{\beta}$-decay rates are based on data in this astrophysical range, except for the capture rate on $^{20}\mathrm{Ne}$, which we predict to have a dominating contribution from the second-forbidden transition between the $^{20}\mathrm{Ne}$ and $^{20}\mathrm{F}$ ground states in the density range ${log}_{10}\ensuremath{\rho}{Y}_{e}(\mathrm{g}\phantom{\rule{0.28em}{0ex}}{\mathrm{cm}}^{\ensuremath{-}3})=9.3$--9.6. The dominance of a few individual transitions allows us to present the various rates by analytical expressions at the relevant astrophysical conditions. We also derive the screening corrections to the rates.