Uh, most e-cigs now have computers and memory inside them. Any cig that uses a chip can have malware put on said chip.
Does it actually happen in practice? I don't know, but it's certainly possible. Indeed, I expect to see hackers at DEFCON and the like present proof-of-concept code in the future.
4 pins in a standard USB connector. Pin 1 receives the positive direct current. Pin 4 returns unused direct current back to the computer. Pin 2 receives data from the device and 3 sends data to the device.
If you are talking about an Ego style battery the charger would have to be complicit. The direct connection of the ego has a positive and negative post only and utilizes pins 1 and 4 of the USB connector. To do what you are talking about the charger would need to have a chip to receive data and the electricity AND the ability to separate data from raw DC so it can then send data to the computer using only pin 2 of the USB connection.
Does anyone remember if it was Reddit that had people taking about boiling batteries to improve performance?