You don’t have to be a rocket scientist to know that bringing a fireworks shell to an airport TSA checkpoint is not a good idea.

But one traveler did just that on Monday at JFK Airport, where he was cited by police before his flight to Toronto, TSA spokeswoman Lisa Farbstein said.

“This aerial display shell, the technical term for a large fireworks shell, is highly explosive and is not allowed on an airplane. Someone brought this one to the #TSA checkpoint at @JFKairport,” she said in a tweet.

“Thanks fella, for slowing down the checkpoint,” Farbstein added.

“In this case, fortunately it was determined that there was no ill intent on the part of the passenger and he was allowed to catch his flight,” she told The Post in an email.

“However the fireworks shell was confiscated and will be disposed of in accordance with proper hazardous materials protocol.”