The vulnerability has been revealed by tech-scientists from Ben Gurion University of the Negev, who published their findings in a new paper titled, "Speake(a)r: Turn speakers to microphones for fun and profit."
"The fact that headphones, earphones and speakers are physically built like microphones and that an audio port's role in the PC can be reprogramed from output to input creates a vulnerability that can be abused by hackers," professor Yuval Elovici, director of the BGU Cybersecurity Research Center (CSRC) said in a statement.
The researchers reversed sound vibrations in membranes emitted in sound waves from the headphones, converting them back into electromagnetic signals. "Even if you remove your computer's microphone, if you use headphones you can be recorded," Mordechai Guri, lead cyber security researcher said.
This means headphones could potentially be repurposed into microphones allowing someone to record the conversation.
The malware that exploits this vulnerability targets RealTek software found in the majority of desktop computers and laptops, "even when the computer doesn't have a connected microphone."
"Out experiments demonstrate that intelligible audio can be acquired through earphones and can then be transmitted distances up to several meters away," according to researchers, who found they could remotely record audio from up to 20 feet away from a set of headphones.
However, there is one small anomaly, in that the reversal of the sound vibrations can't happen when the headphones are being used to listen to music.