legal – Can I get into trouble for making a malware?

I'm doing a malicious software in my final dissertation at the university. I will never use it, and it was made solely for educational and scientific purposes. But my university will publish it, giving the opportunity for everyone to use it. If someone commits a crime with my software, can I get into trouble?