This week, a security researcher named Sam Curry wrote about a recent research project where he cracked his Tesla and found a vulnerability in it. As part of his research, he attempted a XSS (cross-site scripting) injection when setting up his car’s name in the in-car menu system. After a few tries with no results he decided to call it a night.
In his Blog post, Sam wrote that he didn’t think anything of the test and actually forgot about it since he didn’t get any results for a while. Then one day while driving down the highway a rock cracked his windshield and he made an appointment to get it fixed. Later he received a text from Tesla saying they were looking into fixing the cracked windshield. He checked the XSS server and found out that his script forwarded information from teslamotors.com, indicating the XSS attack worked.
After investigating, he found information about his car loaded to his server by the exploit. While he found nothing truly private, or at least that’s what he described in his report, he accessed a server that likely had more information on it. He even expects that he could modify vehicle configurations if given more time. Being a responsible hacker, he presented his findings to Tesla and they patched their software the same day.
Most website admins know to protect their website from cross-site-scripting, but some applications may accept un-sanitized inputs and pass them on to the back-end server. If you don’t sanitize all user inputs, they it could be exploited with cross-site scripting. We recommend you follow the OWASP prevention models including XSS prevention here.