Yahoo says it has identified an attempted hack on customers' email accounts.
It said the usernames and passwords for accounts were likely to have been collected from a database owned by a third party that had been compromised.
It has reset passwords on all affected accounts and has implemented an extra verification step when users sign in.
The company said it was working with law enforcement to find out who was responsible for the attack.
It has not revealed how many Yahoo email accounts have been affected.
"Our ongoing investigation shows that malicious computer software used the list of usernames and passwords to access Yahoo Mail accounts," said a statement on Yahoo's Tumblr page written by Jay Rossiter, a senior vice-president at the company.
"The information sought in the attack seems to be names and email addresses from the affected accounts' most recent sent emails."
No date was given for the attempted hack but the company said there was no evidence that the usernames and passwords had been obtained directly from Yahoo's systems.
It went on to say that it had implemented "additional measures to block attacks against Yahoo's systems".
Customers were advised to change their passwords when prompted and reminded to pick new passwords on a regular basis.
The statement warned that customers should never use the same password to log in to many different sites.
"Using the same password on multiple sites or services makes users particularly vulnerable to these types of attacks," it said.
This is not the first incident to affect Yahoo since its mail service was redesigned in October last year.
At the time thousands of users complained about the removal of key functions and others reported technical problems.
These included the removal of tabs, meaning users could not organise their inboxes. Others complained about the placing of the delete button next to the sender name and no longer having new emails in bold. Some reported that emails were disappearing from their folder after sending.
In December some users were not able to access their accounts because of a hardware problem at one of its data centres that lasted several days.
Yahoo shares fell more than 5% after it announced a drop in revenue for the fourth straight quarter in its latest set of results.