I can't be sure of the answer under US computer-specific law, but I can suggest some important legal themes that may arise under general law.
The issue might (in legal terms) be analogous to booby trapping a store you own, in case an intruder comes in. In English law, at least, you are liable for foreseeable harm suffered by persons entering your property, even if they don't have permission to enter. (I'm not sure how much that principle still applies in US law but the basic legal principle probably does still exist and is relevant)
That is, if you set up an Indiana Jones style death-trap in your shop's back-room, on the basis "Anyone who is killed by it shouldn't have been there anyway!", you'd most likely still be found guilty of murder (or some other legal form of culpable killing), the justification wouldn't suffice.
I suspect a similar legal position would apply to deliberate malware of your own computer systems - the principle "volenti non fit injuria" (roughly meaning, a volunteer can't claim in law for a resulting injury) wouldn't help you, because they wouldn't have been a true "volenti" (they consented by their action to the reasonably foreseeable risks of usual tech intrusion but did not consent to the risk of deliberate malware waiting for them.
If you put a sign on the website "Our servers contain malware, do not intrude other than at your own risk" or similar, that might free you from direct liability.
But if your malware harms other parties, you'd still probably be liable for that harm since it's a foreseeable consequence of keeping malware on your server in an unsafe way, and not deleting them on sight.
Specific computers-related laws would probably be very specifically worded. For that, you'd best get an answer from someone who knows US computer law. But again, foreseeability and reasonable care if you keep malware, could be important.
(A possibly-significant corroborative indicator is that, although piracy is a major source of computer loss, very very few software companies meet it by booby-trapping their software.)