Massachusetts’ ban on all vaping devices last week could accelerate rather than curb a spate of vaping-related illnesses across the state, a local cannabis-testing expert warned.

The temporary clampdown on all e-cigarettes, whether used for nicotine or marijuana-derived THC, is a “cause of concern” because it could “push people into the black market” where unregulated pipes and oils post the greatest risks, said Chris Hudalla, founder and chief science officer of ProVerde Labs of Milton, Massachusetts.

“I understand the intent here,” he said, but the state’s ban may actually “enhance the sale of black market vape products as consumers no longer have access to a regulated tested supply,” Hudalla told The Post.

“You could have more instances of people getting sick,” he added.

A certified lab report from the firm last week shows there’s a potentially dangerous strain of marijuana called “Cotton Candy Cart,” which is currently used in black market vaping devices in Massachusetts.

The ProVerde lab analysis shows unacceptable limits of myclobutanil, a commonly used fungicide, which can degrade into hydrogen cyanide when heated or burned.

The sample was submitted by a user who complained of “respiratory” problems and “bad feelings,” Hudalla said.

“I’ve been told that this brand is widely accessible here in Massachusetts” and perhaps other areas as well, he said.

A spokeswoman for Massachusetts Gov. Charlie Baker said the administration would “consider all options as next steps.”

Meanwhile, the US Centers for Disease Control and Prevention issued alarming new statistics on Thursday, saying 18 deaths and more than 1,000 serious lung ailments cases have been confirmed — with health officials noting that the epidemic shows no signs of abating.

Myclobutanil can be used in vaping devices to disperse solid THC, making it possible to inhale it, said Dr. Maria R. Burgio, a clinical neuropsychologist who testifies as an expert witness in New York state court.

The fungicide is normally sold in one-gallon cans and is used by exterminators to kill fungus, she said. “It’s not something that you want going into your lungs.”

CDC officials last week reported that the majority of those sickened in the vape crisis used cannabis products containing THC — with many of those saying they used counterfeit marijuana products procured from the illicit market.