Mayor Bill de Blasio’s new ferry fleet can barely stay afloat, with at least five new boats pulled out of service to fix potentially disastrous leaks — three of them still sitting in dry dock, The Post has learned.

The Coast Guard ordered repairs following inspections that uncovered “heavy pitting” in the aluminum hulls of the three idled vessels, USCG Warrant Officer Allyson Conroy said.

The inspections — conducted last week at shipyards in Rockland County and southern New Jersey — came after the Coast Guard received a report of “minor mechanical issues,” Conroy said.

Records show the catamaran-style ferries were quietly taken out of service starting Oct. 14, less than six months after de Blasio took a ceremonial first ride on the NYC Ferry service.

City officials had promised the watercraft — which cost about $4 million each — would be built “with the latest in 21st-century maritime technology and best design practices.”

But sources said workers were welding metal patches onto the leaky hulls while experts scramble to figure out why corrosion was causing the 3/16-inch aluminum to fail so soon.

“There are holes the size of a pencil inside, below the water line,” said one source familiar with the problem.

“In theory, you can lose one compartment, but if you get a hole punched the size of your fist in one compartment, with the water pressure, it can implode and the compartment can sink quick.

“It can list to one side and increase water pressure on the other compartment and cause this to become catastrophic quickly,” the source added.

A crew member on the East River’s South Brooklyn route between Bay Ridge and Manhattan’s Pier 11 confirmed that the fleet has been plagued by holes in its hulls.

“We’ve had lots of little problems, mostly leaks. It really depends on the boat, but it happens,” the worker said. “The system is new — it’s all part of the process.”

Taxpayers are sinking $325 million into de Blasio’s maritime commuter program.

While the exact cause of the holes hasn’t been determined, one source blamed a combination of engine vibration and saltwater, along with possible stray electrical voltage, that led to a chemical reaction called electrolysis.

Photos show small, round divots and larger pockmarked areas in the hull of the Great Eagle ferry, which is being repaired, along with the Happy Hauler, at the North River Shipyard in Nyack.

The Owl’s Head is undergoing repairs by Yank Marine in Tuckahoe, NJ. All three were built by Metal Shark of Jeanerette, La., which didn’t return requests for comment.

A spokesman for Hornblower, which operates NYC Ferry, acknowledged holes in the boats, but claimed they were the result of sandblasting to move improperly installed engine radiators, called “keel coolers.”

“There was some corrosion to parts of the hull, but no holes, and the structural integrity was never compromised,” spokesman Joshua Knoller added.

Anthony Hogrebe of the city Economic Development Corp., which funds the ferry program, also downplayed the problem.

“This is a minor issue affecting three boats. It hasn’t impacted service and it won’t cost the city a penny to fix,” he said.

Additional reporting by Ruth Weissmann, Danielle Furfaro and Bruce Golding