Sometime after Christmas, Kristoffer Von Hassel's parents noticed he had been playing video games on his father's account when he wasn't supposed to be.
Von Hassel's father, who works in computer security, asked his son to show him how he was logging on. When the boy typed in the wrong password, a password verification screen appeared. Simply by typing in space keys and hitting enter, the child discovered a back door to logging in.
Father and son reported the bug to Microsoft, and the company has since fixed the issue. Much to the boy's delight, the company even acknowledged him on its website, calling him a "security researcher."
The boy is also getting a $50 reward and a year-long subscription to Xbox Live.
It's not the first time Von Hassel has showed off his tech know-how. When he was a year old, he figured out how to bypass the toddler lock on a cellphone by holding down the home key.
ABC News and CNN contributed to this report.