Recently in 2018, Niu et al. proposed a measurement-device-independent quantum secure direct communication protocol using Einstein-Podolsky-Rosen pairs and generalized it to a quantum dialogue protocol (Niu et al., Science bulletin 63.20, 2018). By analyzing these protocols we find some security issues in both these protocols. In this work, we show that both the protocols are not secure against information leakage, and a third party can get half of the secret information without any active attack. We also propose suitable modifications of these protocols to improve the security.