The 21-year-old has impressed at wing-back since he was handed a starting spot last month.
Sang, who spent the first half of the campaign at Cheltenham, told the Bluebirds' website: “I've kept my head down and kept working and I'm absolutely buzzing that I'm here for the next two years, and hopefully even more.
“You've got to want it and I want to get better every single day. I'm just delighted that I've got a future here to build on.
“As soon as I came back from loan, I knew what my job was and I knew where I was going to be playing if the chance came. It's a really good environment to be in.
“I want to thank the gaffer for the opportunity and the trust in me."
Sang's new deal runs until the summer of 2023.