The contribution is concerned with the derivation and implementation of shape sensitivity analysis in the context of the extended finite element method (xfem). Here, the displacement approximation is enhanced in order to model strong and weak discontinuities along the interfaces and cracks. Consequently, sensitivity analysis must be accomplished for the extended formulation based on a sub-integration technique on sub-domains of the cut elements. This cumbersome and error-prone work can be circumvent using a standard treatment of sub-elements on an appropriately defined sub-mesh. These modifications guarantee exact analytical sensitivities even for distorted finite element domains. (© 2012 Wiley-VCH Verlag GmbH & Co. KGaA, Weinheim)