It's illegal for officers and directors to short their own stock. It's not technically illegal for any other employee.
That being said I've never seen a company that allows it in their company policy. Every company I've seen forbids it to eliminate the appearance of unethical behavior.