Posting an answer key to an exam online is a serious violation. What may be considered as the accused student's intent in doing so, were they doing so with no malicious purpose or no ill intent? Did they do so just without thinking through the consequences? Or did they do so, say, with some malicious purpose or some less honorable purpose? A person's intent could be considered in terms of also the level at which a student is. Are they an undergraduate student, a graduate student, a PhD student, a law student, a medical student? Undergraduate students are held to a lot high level of accountability.
The further you go in higher education, the higher of a level of accountability that one is held to yet. There can be mitigating circumstances that would need to be conveyed to the school at the given time. If a person is entirely within the wrong in doing so and based on an allegation of that nature, that may in fact be the case. There may be a matter of trying to seek the most mitigated resolution to the matter.
Having an experienced attorney advisor will be your best ally to help you understand and navigate the process. Potential consequences can be severe. They can include anything from probation, suspension, expulsion. Even a warning can have unexpected consequences. Having an experienced attorney advisor in your corner from as early as possible in the process will help you to take the best steps forward.