When you arrive in Newark on an international flight you have to go thru immigration, then customs. This will then put you OUTSIDE security, so you will have to be screened again in any case if you have a connecting flight.
After exiting customs, it is a very short walk to an outdoor spot where you can smoke.
SunLover