In recent years, there has been a significant growth in Information Technology usage in human lives. Nowadays, you may find only a few persons who do not need different aspects of new technologies including IT. For example, much of affairs like controlling industrial product lines and financial transaction are done via computers. Thus any threat to computers or IT systems is a threat to society. From the security professionals’ viewpoints, threats are categorized in the following topics: Software Bugs, Spams, Denial of Service Attacks and Malwares. Malwares are the most important computer threats. Because Malware could propagate using spams, and may also be used to send spams. Malware may take advantage of bugs and malware may be used to mount DoS attacks. Internet users have experienced different type of malwares such as Random Scanning active worms, email worms and peer to peer worms. Due to increasing usage of web services among internet users, in recent years, malware writers focused their attacks on web services, thus this could affect lots of users. One of the web 2.0 services is online social networks. In which, people all around the world, get linked with each other due to their acquaintance. For example Facebook and MySpace are two online social networks. The importance of these types of networks is that they gather geographically distributed people in one place. Thus this feature makes social networks a good target for malware attacks. Hackers exploit the trustiness among users in the social networks for their malicious purposes. For example, various active worms are spread among online social networks that had much more infected users than other internet worms. “Samy” the worm that propagated in MySpace Social Network infected 1 million users within 20 hours which noticeably had higher infection rate than other infectious worms such as “Code Red” or “Blaster”, which were spread earlier. Since Web is the most popular service of the Internet, many use this service frequently. Thus the potential firepower of the infected web users is higher than other type of services. For example, if the infected users of “Samy” worm send a request to download a picture from a web host, that web host can easily get down because of the large amount of requests that it cannot handle. Due to this reason, in this dissertation, malware propagation in online social networks has been studied, simulated and analyzed. Simulation and analyzing of malware propagation in online social networks helps us to have a better understanding of the propagation dynamics. This eventually allow Key Words: Active Worms ; Online Social Networks; XSS