I don't think so. Certainly not for any peripheral that is allowed to do DMA. Though plugging in a malicious firewire peripheral is a lot more practical than replacing the battery...
http://www.hermann-uwe.de/blog/physical-memory-attacks-via-f...
http://www.hermann-uwe.de/blog/physical-memory-attacks-via-f...
From the post, the author says the battery could repeatedly install malware or spyware to your computer.
What would be more worrying is if someone found a way to hack directly to you battery. IE a virus you get installs itself to your battery as its resurrection method rather than in a system file. Worse yet would be if someone maliciously wrote a virus that caused your battery to overcharge a month down the road.
Imagine all those stupid MSN virus' if they could fry your laptop battery.