Cyber-Physical Systems (CPS) are being developed to provide useful interactions between physical systems and environments and cyber world for a variety of applications. CPS are designed with a set of software and interconnected distributed hardware components that are linked with physical elements to provide advanced monitoring and control mechanisms geared towards enhancing the targeted physical system or environment. These components function seamlessly to offer specific functionalities that help enhance human lives, physical system operations and environments. While CPS can offer many smart enhancements for improving physical processes, the development of such complex systems composed of many distributed and heterogeneous components is extremely difficult. This is due to the many communication, computing, and networking challenges. Using an appropriate middleware that provides a framework to support developing and operating diverse CPS applications is a novel method to address these challenges. The availability of advanced middleware services and platforms can provide effective approaches for enhancing CPS application development processes as well as provide more robust environments for operating CPS applications. Such middleware can significantly reduce the time needed to design, build, test, and operate robust CPS applications. However, designing a common middleware platform for diverse types of CPS applications is not trivial. This paper investigates the middleware challenges for CPS, based on the different types of CPS applications being developed and their specific challenges. In addition, the paper discusses the current efforts of developing middleware platforms for CPS and the open research issues in the field.