Penalties for disclosing student grades without consent
In the US the Family Educational Rights and Privacy Act (FERPA) protects the privacy of students. This "act" is not a law (on further reading it is a law), but rather a stipulation by the Department of Education that universities must obey in order to receive funding. As such, I do not believe that violations are classed as a criminal offense and hence cannot lead to jail time. Universities which violate the FERPA can lose their funding and likely have grounds to dismiss employees who violate the act. The university might even be able to seek damages against those individuals, but again, not jail time.

I would suggest that you not violate FERPA. If you intend to, or have done so (accidentally or otherwise), I suggest that you seek legal advice.