Can your former employer say bad things about you?
Can a past employer give a bad reference? Absolutely. If you only list people from old jobs instead of your most recent position, an employer might get suspicious. Better yet, they can call that job's HR department to verify past employment and that you left in good standing with the company.
How do you answer what would your last boss say about you?
3 Strategies for Answering "How Would Your Boss or Coworkers Describe You?"
Is it illegal to talk bad about a former employer?
Generally, an employer is not prohibited by law from providing truthful information about a former employee to a prospective employer. The law has little reason to discourage employers from providing their honest assessments of an employee's performance, regardless of whether this assessment is good or bad.