Uber CEO Dara Khosrowshahi took predecessor and co-founder Travis Kalanick to task on Tuesday for leading the ride-hailing giant astray.

The "moral compass of the company" was not pointing in the right direction under Kalanick, Khosrowshahi told CNBC from the World Economic Forum in Davos, Switzerland.

Kalanick's hard-driving vision turned Uber into one of the world's most valuable private companies. But he was ousted last year after a series of scandals. He remains a board member.

"The relationship with Travis is fine, but it's strained because obviously there was a lot that happened in the past that wasn't right," Khosrowshahi said.

Under Kalanick's leadership, the company faced accusations of a culture of sexism and sexual harassment. The accusations include a memo in which Kalanick detailed ground rules for consensual employee sex practices. After an internal investigation, Kalanick was pushed out by the board.

Kalanick also faced contentious personnel departures, high-profile lawsuits, revelations about a fake app designed to fool government regulators, a profanity-laced argument with an Uber driver caught on video, and social media uproar over his joining President Donald Trump advisory council.