Context. Understanding the transport properties of energetic particles in the presence of magnetic turbulence is crucial for interpreting observations of supernova remnants (SNR) and for assessing the cosmic-ray acceleration mechanism. Aims. We aim at obtaining information on the transport regimes of energetic electrons upstream and downstream of SNR blast waves by studying the X-ray rims. Methods. We considered emission profiles expected when synchrotron energy losses dominate, normal diffusion (typically causing an exponential decay), and superdiffusion (causing a power-law decay) for a spherically symmetric model. Then we compared the model profiles, projected on the plane of the sky, with Chandra observations of supernova (SN)1006 and Tycho's SN. Results. Our study shows that downstream of the blast wave the observed profile is exponentially cutoff due to synchrotron energy losses in the amplified and shock compressed magnetic field present. Upstream of the blast wave and close to the shock, the observed profile of SN1006 is well reproduced by electron diffusion in the Bohm regime. However, the long X-ray tail far upstream of the shock is better explained by considering a change in the energetic electrons' transport regime, that appears to become superdiffusive and gives rise to a power law intensity profile on scales over which the magnetic field strength can be assumed to be constant. Similar results are obtained for Tycho, although in this case the nonlinear effects associated with particle acceleration appear to be stronger close to the shock. Conclusions. The analysis of Chandra observations of the X-ray thin rims of SN1006 and of Tycho's SN, SN 1572, can be well explained assuming normal diffusion in the vicinity of the blast wave and superdiffusion far upstream, similarly to what has been found for particles accelerated at interplanetary shocks. This suggests that anomalous transport is common in both interplanetary space and interstellar medium.