With the November U.S. midterm elections approaching, all eyes are on Facebook (FB) and Twitter (TWTR) .

Since 2016, nonstop reports of bots, trolls and Russian-bought political ads running amok on social media have forced tech companies, even Alphabet (GOOGL) , to pull back the curtain on how they handle ads and user data -- and scramble to run damage control. Last Friday, 12 Russian agents were indicted for hacking and other efforts to interfere with the 2016 U.S. presidential election.

Here's an update on how the tech giants' efforts to deal with the problem have gone, and how fake accounts could still haunt Facebook, Twitter and Instagram down the road. 

Facebook's 'My Bad'

"We know we were slow to pick-up foreign interference in the 2016 US elections," Facebook's VP of advertising Rob Goldman wrote in an April blog post.

It took the social network several months to act on the criticisms, at least publicly. Back in November 2016, CEO Mark Zuckerberg brushed off the notion that 'fake news' on Facebook could possibly influence U.S. politics. By now, after endless allegations of disinformation, Russian-bought political ads, mishandling of user data and slippery third-party deals, nobody believes that anymore.

Facebook says that it's on the case. In April, the company said that they had removed 270 pages and accounts operated by the Internet Research Agency (IRA), a Russian-based troll farm that, according to Zuckerberg, "had set up a network of hundreds of fake accounts to spread divisive content and interfere in the US presidential election."

Banishing the Trolls

In a blog post, Facebook's chief security officer Alex Stamos said that Facebook removed IRA-bought pages and ads across Facebook and Instagram, but acknowledged that such politically-motivated groups "are always changing their tactics to hide from our security team."

Zuckerberg added in his April post that Facebook had removed 30,000 fake accounts based in France leading up to its 2017 presidential election, and had "deployed new AI tools that proactively detected and removed fake accounts in Macedonia" during the U.S. Senate special election in Alabama in 2017, among other efforts. When reached for comment, Facebook said they didn't have any updates on how many fake accounts have been removed in total.

As for Twitter, the company has periodically identified inauthentic, inactive or spam users since at least September of last year, suspending 58 million suspicious accounts in the last quarter of 2017. More recently, it locked millions of accounts determined to be suspicious, leading to sizable follower drops of many high-profile users such as Katy Perry, President Trump and even Twitter's CEO Jack Dorsey.

Both Twitter and Facebook have also rolled out tools intended to shine a light on who's buying political ads, with Twitter creating an 'ad transparency center' and Facebook requiring that users who buy political ads be 'authorized' by verifying their identity.

Even Alphabet identified some U.S.-targeted political ads connected to the Russian government -- but the company has escaped the brunt of criticism so far, in part because Google had previously limited politically-targeted advertising according to the NY Times.

How Many Fakes Are There?

While millions of fake social accounts have been purged, it's clear that malicious bots are still very much alive and well.

In June, the Alliance for Securing Democracy reported there were at least 3,800 Twitter accounts connected to the IRA. The Alliance tracks hundreds of other accounts linked to Russian influence operations, identifying tens of thousands per day that include "content attacking the U.S. and Europe, conspiracy theories and disinformation."

On Facebook, it's harder to tell. In May, Facebook's VP of product management Guy Rosen wrote in a blog post that it had disabled 583 million fake accounts in Q1 of this year, mostly "within minutes of being created." But it didn't specify how many active accounts have been suspended. In a May financial filing, however, Facebook estimated that 3-4% of its monthly dfactive users (MAUs) were fake accounts as of Q4 2017, while as many as 10% of users were 'duplicate' accounts -- defined as "one that a user maintains in addition to his or her principal account."

As Facebook runs damage control on its main site, Instagram -- Facebook's mega-popular photo app boasting more than a billion users of its own -- might soon be faced with more fake account issues. According to a study by the security firm Ghost Data as reported by The Information, as many as 9.5% of Instagram users are bots -- nearly 100 million.

That could spell problems for Instagram down the road.

"With Instagram surpassing the billion-user milestone, more users are demanding more verification filters to ensure that the content they are consuming comes from credible and trustworthy sources," said Yuval Ben-Itzhak, CEO of the social media marketing platform Socialbakers. "Instagram will need to continuously evaluate each profile as they can quickly become malicious."

Will Account Purges Hurt the Bottom Line?

Whether the crackdowns affect companies' cash cows -- their ad empires, built on daily and monthly user counts -- is another question entirely. After declining sharply in March over the Cambridge Analytica data scandal, Facebook shares have since fully recovered and are now trading at near all-time highs, while Twitter shares have staged a big comeback and are up more than 80% this year alone.  

On Twitter, the widespread account lockdown last week -- which involved asking owners of inactive or suspicious accounts to validate their accounts -- affected tens of millions of accounts and a total of about 6% of 'follows,' a spokesperson said.

Vijaya Gadde, policy lead at Twitter, wrote in a blog post that the recent lockdown won't impact Twitter's user metrics, at least not right away. According to Gadde, the suspect accounts are given a month to verify themselves before being removed entirely, meaning we may see a drop in a few weeks.

"While today's change doesn't affect MAU (monthly active users) or DAU, some accounts we remove from the service as part of our ongoing commitment to a healthy public conversation have the potential to impact publicly-reported metrics," Gadde wrote.

For advertisers who pump money into Twitter, Facebook and Instagram in hopes of reaching real people, that might not be an entirely bad thing.

"While it may come as a surprise for brands to see a huge drop in Twitter followers, it's actually extremely beneficial," added Socialbakers' Ben-Itzhak. "Removing dead weight from their following increases their chances of acquiring meaningful interactions. It gives them the ability to rebuild a loyal audience that they can count on."

Facebook and Alphabet are holdings in Jim Cramer's Action Alerts PLUS member club. Want to be alerted before Jim Cramer buys or sells these stocks? Learn more now.

More from Technology

Monday Madness: Is Nvidia a Hit or Miss?

Monday Madness: Is Nvidia a Hit or Miss?

Why Netflix Will Have a Good Earnings Report This Week

Why Netflix Will Have a Good Earnings Report This Week

More Tech and Finance Executives Back Away from Saudi Ties

More Tech and Finance Executives Back Away from Saudi Ties

Google in Deal to Build Telecom Cable to France

Google in Deal to Build Telecom Cable to France

Dubai Shows Off Region's First Self-Driving Taxi

Dubai Shows Off Region's First Self-Driving Taxi