Viber has become one of the popular messengers in the world. Although it ensures the complete privacy for the users yet it is your responsibility to keep check on your security settings. You can keep viber chats secure by three ways
1: Always have updated version of viber.
2: The version 6.0 and above offers end to end encryption.
3: Always block the messages from unknown contact
To check your viber version open google play store if you are using android phone

Open viber by writing on search box on playstore

Now open viber messenger App

Now scroll down and click on the option "About This App"

Now scroll down and you can check the version of viber. In case if it is not updated you will get the option of update.

If your version is not 6.0 or above then you will not get one to one encryption so try to update your Viber to get complete privacy.
2ndly Always Block the Messages from unknown contact
To block the contact in viber, launch the app

Now open the chat that you want to Block

Click on three dots on right top corner of chat screen

Open the chat info

Scroll down and click on "Block" Option

In this way you will not get any messages and keep your phone free of spam.