An applicant will be denied a hazardous materials endorsement if they:

Your application for a hazardous materials endorsement can be denied, or your existing endorsement canceled, if you do not have legal permanent status in the United States; you renounce U.S. citizenship; you are wanted for, under indictment for, or convicted of certain felonies; you are judged mentally incompetent or are involuntarily committed to a mental institution; or you are deemed by the Transportation Security Administration to pose a security threat.
DMV Writen Test