Uber knows it's close to losing some employees. It's a stunning turn of events for a company that has dominated lists of best places to work. And while Uber still far outflanks most other American companies in the rankings, cracks are starting to show in its gold-clad workforce. Data from Paysa shows that Uber has been consistently the top-ranked company for quality of talent over the past two years. Uber was named the 5th most desirable place to work this year by LinkedIn. Uber employees are already paid an average of $279,000 a year, according to Paysa, lagging only Netflix, Lyft and Dropbox in the rankings.

Uber drivers protest the company's recent fare cuts and go on strike in front of the car service's New York offices on February 1, 2016 in New York City. Getty Images

But the company has been through what board member Arianna Huffington calls a "crucible," after allegations of sexual harassment and gender bias from former employee Susan Fowler. A series of scandals — an executive that reportedly obtained medical records from a rape victim, that employees reportedly did cocaine on a company trip and that top executives visited an escort karaoke bar — may be slowly blocking Uber's talent pipeline. Job applications doubled year-over-year in February, and people viewing and applying to open positions is still up by more than 35 percent at Uber, according to LinkedIn data. But they fell 15 percent after the sexual harassment allegations, according to LinkedIn.

Not only that, but the quality of existing talent — and Uber's edge over other companies — has been slipping since April, according to Paysa. "So I have spoken to a lot of you personally, and I know that you're polishing your resumes," Uber's human resources chief Liane Hornsey told staffers in leaked audio obtained by Yahoo Finance. "I know your LinkedIn profiles are getting a little more deep. And I know you're taking those calls. And I just want to say, I don't know how any of you could think this is the moment to leave this company." A company sliding a spot or two from the top of a list may seem negligible. But it comes at a time when tech companies are fighting harder than ever for the best talent. Companies that hadn't traditionally focused on technology — like refrigerator manufacturers or car companies — are recruiting in Silicon Valley now, too, said Lars Schmidt, founder of human resources firm Amplify. So now, recruiters and lawyers say, Uber has two challenges: Continuing to attract top talent in Silicon Valley, and keeping existing workers from getting discouraged.

Attracting the top talent for Uber 2.0

Any openings at Uber must now filled according to a rigorous set of new guidelines aimed at improving diversity. "I want to get very, very serious here. I truly do not think companies do this well," Hornsey said at an all-hands meeting this week. "This is where I've seen companies go wrong in the past. It is not just about hiring. We can hire as many people of color, or as many women engineers that we can absorb. But I have watched other companies hire many people, and those people leave."

I would have a really hard time being an Uber recruiter right now, trying to build trust with diverse candidates. Kate Bischoff tHRive Law & Consulting

The number of applicants is still growing at Uber, if more slowly than before. But one employment attorney, who asked not to be named because she works with Silicon Valley companies, said she suspected that many of the recent applicants felt they couldn't have gotten an offer from Uber a year ago, or were trying to get more job offers to leverage their salary at another employer. Since the field is so competitive, many engineers may be applying to multiple companies to weigh offers, she said. And part of it does, indeed, depend on the applicant. Applicants for self-driving car jobs across the industry were 69 percent male, 27 percent unidentified and 6 percent women, Paysa data shows. Another disparity: On anonymous review site Glassdoor, Uber has a 4.1-star rating. At InHerSight, which focuses on female employees, the company has a 3.1-rating. Still, it might not be as hard to fill Uber slots as one would think. Even with a deeper investigation of the interest in Uber's jobs and brand, and employee retention, LinkedIn concluded that opportunities outweighed culture for many applicants. After all, Susan Fowler was not the first to raise the concerns of gender bias at Uber. The viral Medium blog post, "Dear Uber recruiter," skewered Uber's track record on women in 2016.

Stemming brain drain

Uber let go of at least 20 employees while probing its workplace culture. A lot of the company's top brass has also departed in the past few months: senior vice president Emil Michael, president Jeff Jones, senior vice president of engineering Amit Singhal, self-driving car boss Anthony Levandowski, board member David Bonderman and finance head Gautam Gupta, to name a few. CEO Travis Kalanick is on leave and the company is still seeking a chief operating officer.

Emil Michael, senior vice president of business development at Uber. Chris Goodney | Bloomberg | Getty Images

Now on top of that, other companies now have an eye out for disgruntled employees. "In terms of recruiters circling, any time there's distress there's going to be people that are opportunistic," Solomon said. New data provided to CNBC shows that between April 2016 to April 2017, among applicants tracked by Paysa, the bulk of workers that left Uber (31) were software engineers. The top companies poaching Uber talent are Google, Facebook, Amazon and Lyft, in that order. And by far, most of the employees leaving Uber (92) were male, compared to 30 workers whose genders were unknown and 17 who were female. (Only 15.4 percent of Uber's tech talent worldwide is female).

That's the cost of doing business they way they are doing business. Michael Solomon 10x Management

And when you have engineers who work on self-driving cars — one of the most marketable skills in tech — bids get even fiercer. Michael Solomon, who represents freelance tech talent for 10x Management, said he's confident that recruiters have successfully poached Uber workers already. "100 percent likely. Recruiting is cut-throat," said Schmidt, when asked if Uber is a recruiting target. "Absolutely, their engineers are getting calls. Sales and marketing probably would as well. Uber has a good reputation. They draw talent, other recruiters know that. Regardless of the field." Retaining existing employees — and hiring new ones — may come down to one major factor: money, Solomon said. "I think that's one of the places they are going to pay for their foibles," Solomon said. "They are going to have to entice people to get them to stay, that's the cost of doing business they way they are doing business." And some potential employees may see tenure at the company as a black mark, given the culture there. Leslie Miley — an advocate for better diversity practices in the Valley — has said he'd be wary of hiring someone who did well in Uber's hard-driving culture. Because some people have been terminated in connection with claims of sexual harassment, discrimination, bullying or other violations, leaving Uber during this time period could paint one as "a hero leaving on moral ground" or a "perpetrator," Solomon said. He said that a due diligence process and "backchannel" references can usually differentiate the two. But Brooke Schneider, an associate in the employment practice at Withers Bergman, said that Uber would be very limited in the information it could give about past employees. "Even for those who have been dismissed for misconduct, the company wants to be careful not really to disseminate that information. It could be considered defamation," Schneider said. "The investigation should be confidential, even though recommendations became public." Schmidt said he thinks Uber alumni are still valuable in terms of tech talent. "I think that a lot of the ethical questions are primarily at the leadership level. Could it be a stigma? I don't think so. From an innovation standpoint, Uber is still considered a leader. The ethical stigma is tied to leadership," Schmidt said. "I do think it will create recruiting challenge for them. They are going to do their homework when choosing and employer. Some candidates will look at that. "

Breaking the golden handcuffs