SAN FRANCISCO — Lenovo, the world’s second largest computer manufacturer, has settled with the Federal Trade Commission over charges it shipped some of its laptops preloaded with software that compromised security protections in order to deliver ads to consumers. The company will also pay $3.5 million to 32 states that were part of the settlement.

The VisualDiscovery program caused pop-up ads to appear on the user's screen whenever his or her cursor hovered over a similar-looking product on a website. While only information about websites the user visited was transmitted, the program had the ability to access all of a consumer’s sensitive personal information transmitted over the Internet, including login credentials, Social Security numbers, medical information, and financial and payment information, the FTC alleged.

Consumers are frequently shown ads the correspond to their search or viewing history, but it's done via ad tracking software or cookies, which can be turned off on Facebook and Google or by deleting cookies. In the case of the VisualDiscovery software, the software hijacked encrypted web sessions.

“It’s the online equivalent of someone intercepting your mail, opening it, reading it, closing it back up and then putting it back in your mailbox,” said FTC acting chair Maureen Ohlhausen.

The program was created by an third-party advertising software company Superfish that was founded in Israel but headquartered in Palo Alto, Calif. It has since shut its doors.

As many as 750,000 laptops sold in the United States had the program installed from 2014 through 2015, the FTC says.

The FTC alleges that beginning in August of 2014, China-based Lenovo began selling laptops in the United States that came pre-installed with the software program. Consumers weren’t told the software was on their systems.

Beijing-based Lenovo made headlines in 2005 when it purchased IBM’s personal computing division for $1.75 billion, an acquisition that at the time was controversial as many feared it was a beachhead for other Chinese businesses. Today it is the world’s second-largest PC maker, with 20.4% of the global market, very close behind HP which has 21.8%, according to research firm IDC. In 2016 Lenovo's revenue was $43 billion.

Lenovo has published a list of computers that came with the software installed. Its popular ThinkPad laptops were not affected.

“Egregious does describe it,” said Eugene Spafford, founder of the Center for Education and Research in Information Assurance and Security at Purdue University.

“Sadly, other vendors may be doing something similar as the competition for ad revenue is huge, and the mechanisms are not that difficult to build in (or get prepackaged),” he said.

The snooping software was first discovered by and reported by Chris Palmer from the Google Chrome security team.

As part of the settlement, Lenovo must now get consumers' permission before pre-installing any software that injects advertising into consumers' Internet browsing sessions or that transmits sensitive information from their systems to third parties. Lenovo must also implement a comprehensive software security program to test all software the comes preloaded onto its laptops, and that security program will be subject to third-party audits.

In a statement, Lenovo said it "disagrees" with allegations contained in these complaints but is pleased to bring the matter to a close.

In order to be able to show pop-up ads on encrypted websites, the VisualDiscovery program used an insecure method to replace the digital certificates for the websites with its own certificates. VisualDiscovery did not adequately verify that the websites’ digital certificates were valid before replacing them, and used the same, easy-to-crack password on all affected laptops rather than using unique passwords for each laptop, the FTC said.

That meant that even if a consumer went to a website that began with https://, which would lead them to believe they were on a secure and encrypted site, in fact the security had been breached.

“The harm was consumers were buying computers whose basic security features were undermined without their knowledge or consent,” said Ohlhausen.

Lenovo stopped installing the software over a year ago, and many antivirus programs were updated to identify the program and remove it was news about the insecurity broke.

Still, it’s possible that it still exists on some laptops, the FTC said. Lenovo has published instructions on how to remove the Superfish software on its website.

Neither Lenovo nor the FTC are aware of any actual instances of a third party exploiting the vulnerabilities the VisualDiscovery software created to steal user’s communications.