Cloud-based E-health systems can support users to store their health records in the cloud for better care, and ciphertext-policy attribute-based encryption (CP-ABE) with particular functionalities can enhance secure sharing. However, most traceable and revocable schemes only considered user traceability, and the revoked users could access data by conspiring with an unrevoked user. This paper presents a collision resistance CP-ABE scheme with accountability, revocation, and policy hiding. A user's decryption key is associated with the path in a binary tree and a self-selected secret value. By auditing the leaf node value and the secret value, a user or the authority is determined to take responsibility for a compromised key. Then using the binary tree can implement user revocation, which ensures collision avoidance and backward security. Furthermore, the security of the proposed scheme is proven, and the performance analysis indicates that the proposed scheme is efficient.