Cardiff will allow long-serving Kevin McNaughton to leave this summer along with Danny Gabbidon and Nicky Maynard.
Highly-rated Atletico Madrid midfielder Saul Niguez has signed a new five-year contract.
The 26-year old made 14 appearances for the Black Cats following a loan move from Estudiantes in January.
After an unconvincing start, he was a part of the team which finished the season strongly to preserve Sunderland's place in the Barclays Premier League.
Vergini, a central defender who also played at right-back for the Wearsiders, told the club's official website: "I'm very thankful to the club for giving me this opportunity.
"I am very happy to be here once again. I'm also very happy to see so many recognisable faces.
"The challenge for me is to become part of this team and offer all I can so we have a good season. The feeling that I've had here at this club has been very good. It's a big club."
Vergini becomes Sunderland's sixth signing of the summer, following the arrivals of goalkeeper Costel Pantilimon, defenders Billy Jones and Patrick van Aanholt and midfielders Jordi Gomez and Jack Rodwell.