The 28-year-old has returned from his loan spell at Brighton, who head to the Riverside Stadium for the final game of the Sky Bet Championship season on Saturday, and put pen to paper on an extension which will keep him on Teesside until the summer of 2017.
Carayol made five appearances for the South Coast club after recovering from a cruciate ligament injury which sidelined him for almost 12 months.
Head coach Aitor Karanka told the club’s official website: “I’m very happy.
“It is the best thing because he has recovered from a serious injury and had the opportunity to play some games at Brighton.
“He is now able to play for us in the play-offs. Muzzy has improved with us and can be a very important player for us in the future if he continues in the same way.”