Not illigal
Expensive bug bounty
illegal *
And if there's a bug in the code that allows hackers/thieves the ability to go against the consensus rules of the chain, that would be considered illegal creation of coins as they did not follow the rules laid out in the code.