Smart environments provide many benefits to the users including comfort, convenience, energy efficiency, safety, automation, and service quality. The Internet of Things (IoT) has developed to become one of the widely used technologies in smart environments. Many security attacks and threats are generated by security flaws in IoT-based systems and devices, which may affect smart environments ... [Show full abstract] applications. As a result, security is one of the most important issues in any smart area or environment based on the IoT model. This paper presents an overview of smart environments based on IoT technology and highlights the main security issues and countermeasures in the four layers of smart environment IoT architecture. It also reviews some of the current solutions that ensure the security of information in smart environments applications.