  We present a stacked weak lensing analysis of 27 richness selected galaxy
clusters at $0.40 \leqslant z \leqslant 0.62$ in the CODEX survey. The fields
were observed in 5 bands with the CFHT. We measure the stacked surface mass
density profile with a $14\sigma$ significance in the radial range $0.1 < R\
Mpc\ h^{-1} < 2.5$. The profile is well described by the halo model, with the
main halo term following an NFW profile and including the off-centring effect.
We select the background sample using a conservative colour-magnitude method to
reduce the potential systematic errors and contamination by cluster member
galaxies. We perform a Bayesian analysis for the stacked profile and constrain
the best-fit NFW parameters $M_{200c} = 6.6^{+1.0}_{-0.8} \times 10^{14} h^{-1}
M_{\odot}$ and $c_{200c} = 3.7^{+0.7}_{-0.6}$. The off-centring effect was
modelled based on previous observational results found for redMaPPer SDSS
clusters. Our constraints on $M_{200c}$ and $c_{200c}$ allow us to investigate
the consistency with numerical predictions and select a concentration-mass
relation to describe the high richness CODEX sample. Comparing our best-fit
values for $M_{200c}$ and $c_{200c}$ with other observational surveys at
different redshifts, we find no evidence for evolution in the
concentration-mass relation, though it could be mitigated by particular
selection functions. Similar to previous studies investigating the X-ray
luminosity-mass relation, our data suggests a lower evolution than expected
from self-similarity.
