While it's true that it can technically refer to both, I think it's worth mentioning that for university students, there is the word "hallgató" or even "egyetemista" so indirectly, not using those words makes me associate diák with an elementary/high school student.