My car's emergency brake failed to work and my car's rear slid downhill into a 90 degree angle. The front passenger bumper of my car hit the front driver bumper of the car parked behind me. This happened while I was parallel parking in front of my home, which is on right side of a street with an uphill incline. I turned my car's front wheels away from the curb, which is why my car's rear spun into a 90 degree angle. There is a small driveway between my car and the car behind me, which is why my car had the space to spin and slide into 90 degree angle in the middle of the street. I could have sworn my car was shifted to park, but it's possible that I was shifted to reverse or neutral. I almost 100% sure that I initiated my emergency parking break and that it failed to turn on. I had started to exit the driver side door and my legs were outside of the car already when I noticed the car to slide backwards. I panicked and I tried to get back into the car, but I couldn't. My legs were dragged across the street. I have some minor injuries such as bumps, cuts and bruises. My car stopped from sliding when it hit the car behind me. I could have been seriously injured. There should have been some "fail safe" to prevent me from exiting the car when it's possible it could start to move. I'm considering selling my car because of this issue.