The escape in June of two dangerous men from the upstate Clinton Correctional Facility is turning out to be very costly for New Yorkers -- and it's not just the $1 million a day spent on overtime for state police and other personnel during the 23-day search that ended with Richard Matt dead and David Sweat captured.

The state's Department of Corrections is deservedly taking a pretty big hit for a breakdown in the operations of the facility, which is near the Canadian border. Joyce Mitchell, the lovelorn prison worker, has pleaded guilty to helping Matt and Sweat escape and faces up to 7 years in prison when she is sentenced next month. Correction officer Gene Palmer is charged with sneaking tools used in the escape into the facility.

And there may be more criminal charges. After the escape, the prison's superintendent, two top administrators and nine guards were put on leave pending an investigation. Now, The New York Times reports that dozens of inmates have filed claims that they were brutalized in the frenzied days after the escape as embarrassed and angry guards sought information about what happened. The reports include allegations of beatings and choking, and one inmate says he was smothered by a plastic bag over his head until he passed out.

In March, three guards at the Attica Correctional Facility each pleaded guilty to a single misdemeanor charge of misconduct and resigned to avoid going to prison for severely beating a prisoner in 2011. And state police are investigating the April death of an inmate at the Fishkill Correctional Facility that the medical examiner called a homicide.

Clearly, something is rotten in our state prison system. Its internal affairs unit is collecting evidence about the possible assaults by the guards. State Inspector General Catherine Scott is probing the failures at Clinton that led to Matt and Sweat's escape. Both investigations can refer any potential criminal findings to the Clinton County district attorney's office.

Scott needs to deliver a complete and independent accounting of what went wrong at Clinton. Most important, Gov. Andrew Cuomo should use that report as a checklist to review the state's correctional facilities to make sure they are managed well -- not overcrowded, not understaffed and not dangerous.

A mismanaged prison system is just too costly to all New Yorkers.