The fifth generation (5G) communication has the potential to achieve ubiquitous positioning when integrated with a global navigation satellite system (GNSS). The device-to-device (D2D) communication, serving as a key technology in the 5G network, provides the possibility of cooperative positioning with high-density property. The mobile users (MUs) collaborate to jointly share the position and measurement information, which can make use of more references for positioning. In this paper, a GNSS/5G integrated three-dimensional positioning scheme based on D2D communication is proposed, where the time of arrival (TOA) and received signal strength (RSS) measurements are jointly utilized in the 5G network. The density spatial clustering of application with noise (DBSCAN) is exploited to reduce the position uncertainty of the cooperative nodes, and the positions of the requesting nodes are obtained simultaneously. The particle filter (PF) algorithm is further conducted to improve the position accuracy of the requesting nodes. Numerical results show that the position deviation of the cooperative nodes can be significantly decreased and that the proposed algorithm performs better than the nonintegrated one. The DBSCAN brings an increase of about 50% in terms of the positioning accuracy compared with GNSS results, and the PF further increases the accuracy about 8%. It is also verified that the algorithm suits the fixed and dynamic condition well