The CAST experiment at CERN (European Organization of Nuclear Research) searches for axions from the sun. The axion is a pseudoscalar particle that was motivated by theory thirty years ago, with the intention to solve the strong CP problem. Together with the neutralino, the axion is one of the most promising dark matter candidates. The CAST experiment has been taking data during the last two years, setting an upper limit on the coupling of axions to photons more restrictive than from any other solar axion search in the mass range below 0.1 eV. In 2005 CAST will enter a new experimental phase extending the sensitivity of the experiment to higher axion masses. The CAST experiment strongly profits from technology developed for high energy physics and for X-ray astronomy: A superconducting prototype LHC magnet is used to convert potential axions to detectable X-rays in the 1-10 keV range via the inverse Primakoff effect. The most sensitive detector system of CAST is a spin-off from space technology, a Wolter I type X-ray optics in combination with a prototype pn-CCD developed for ESAs XMM-Newton mission. As in other rare event searches, background suppression and a thorough shielding concept is essential to improve the sensitivity of the experiment to the best possible. In this context CAST offers the opportunity to study the background of pn-CCDs and its long term behavior in a terrestrial environment with possible implications for future space applications. We will present a systematic study of the detector background of the pn-CCD of CAST based on the data acquired since 2002 including preliminary results of our background simulations.