However, this is a very common thing to share pendrives, but it is a proven fact that if you share your pendrives or allow others to user their pendrive on your computer you are inviting them to Hack Your Computer.
What Harms It could Make
These hacks via USB drives not only include data-theft like personal information, saved passwords etc., but it can also send malicious emails, destroy your data or even damage your computer.
How it could be done
I am pretty sure that, you would be aware about the potentials of USB. In fact USB drive can serve almost any function for you. For example you can use USB port to connect pendrives, hard-disks, keyboard, mouse, sound card, graphic card, network card, webcam any many other computer peripherals.
Method 1: Likewise malicious software could be installed on microchips of pendrives that can be used be remotely control that pendrive and hence that computer through internet. So what this malicious software does is it manipulates the function of pendrive in such a way that it acts like Network Card. As a Network card is used to transfer data, your antivirus allows the pendrive to see you computers data and hence a hacker can view your all data through a simple internet connection or sometimes even a bluetooth connection whose radio is also installed on the same pendrive.
Method 2:In other cases it is also some hacker manipulate the pendrive in such a way that as soon as this pendrive is connected to your computer it start copying your personal data, saved passwords and many other useful information. All this process is happened in background. So you have nothing to see and no control over it.
How to prevent it ?
The prevention is only possible when we would be able to detect such attacks. But hacking or data-theft by manipulating the firmware of pendrive is almost impossible to detect. By manipulating firmware a pendrive can be made to pretend like a network card, keyboard, webcam or any other device. Now as a Network card is used to send data over network, our computer or antivirus would not block or even suspect it.
However the attacks of the second type could be prevented by using good antivirus, password protection and other such preventive measures.