You have to understand that when you jailbreak you are assuming responsibility for your security. If you stay stock, then it's Apple that takes the blame.Thanks, is the main risk with a jailbreak malware? I think in general Apple iOS un jailbroken is quite secure from what I've heard. If you jailbreak and stay away from piracy etc can you stay just as safe as being an un Jailbroken user?
How much more, at risk is your data and security if you are jailbroken? There's alot to lose these days with the info and data we have on our devices (Banking, ApplePay, Pics, emails, passwords) I'm just trying to get a general view so I know the risks etc before going a head with jailbreaking or not.
By accepting responsibility for the safety of your device it means not putting yourself in the position of adding sketchy repos, repos known for piracy and/or the same for tweaks.
It means doing your homework and research and asking questions if you are unsure – BEFORE YOU DO SOMETHING. We can't help you afterwards.
It means if you install methods to access your device remotely (OpenSSH), learning and understanding the process of changing the default passwords to something only you know. The defaults are just that. And those who would hack your device know the default passwords. They are counting on you NOT knowing what you are doing.
Responsibility also means not handing your device off to people you don't know and allowing them to walk off with it out of your sight. Not visiting websites known for malware/piracy.
Basically, use your common sense.
As long as you do that your device is no less secure than a stock device.