I'm not talking about putting malware into your computer "from" a chart, but about sabotaging the charts themselves.
I haven't seen an instance of charts being tampered with, but it would be dog simple. There is readily available software
to edit and resave all kinds of digital files, raster or vector, and all you would have to do is open the chart file, delete a reef, or move it over 1/4 mile, and resave the file. No one would ever know.
This would be "fun" for the kind of person who is already distributing malware, and there's plenty of them.
This would also be profitable for the kind of folks who were wreckers, literally lighting
false lights in order to strand and shipwreck
ships for hundreds of years. A historically profitable local business in many places, including old time Key West
As to malware in the computer? Many of the bootleg software
sites either carry code in the web page itself, which can infect your computer, or carry malware in the files that you download and execute in order to get the bootleg files. I've seen malware attached to, and coming from, all kinds of sites. Barbie dolls, air conditioning
So, two very different kinds of dangers. And these days the malware can require you to literally wipe everything off the computer to get rid of it. The bad guys have been winning.