Chloë Grace Moretz seen on a night out at Annabel's on July 31, 2019 in London, England.

Just five days after Twitter CEO Jack Dorsey's account was hacked, another appears to have been compromised by hackers.

Actress Chloe Moretz's Twitter account was tweeting expletives Wednesday before the tweets were deleted, either by Moretz or by Twitter.

The tweets were sent to more than 3.1 million people who follow the account. Trevor Duke-Moretz, the actress' older brother, said her account was hacked.

tweet

On another hacked account, owned by rapper Joey Badass, the attackers published a direct message conversation that Moretz had with the musician. That conversation and other tweets sent from the account on Wednesday were deleted around 2:30 p.m.

Twitter on Wednesday afternoon announced in response to the hacks that it would temporarily turn off the ability to tweet via text message and use text messaging to verify an account. Online accounts are often compromised when a hacker calls a victim's wireless carrier and requests to have the number transferred to a new SIM card, which is then used in the hackers phone to recover the password and gain access to the account.

"We're taking this step because of vulnerabilities that need to be addressed by mobile carriers and our reliance on having a linked phone number for two-factor authentication (we're working on improving this)," the company said.

tweet

In one tweet, the account referenced "Chuckling Squad," which also claimed responsibility for Dorsey's attack last week. Tweets also included what alleged to be Dorsey's Social Security number and links to Instagram, where the hacker claimed to have posted nude photos of other celebrities. The home address of one person was also posted before the tweets were removed.

Internet celebrity James Charles and YouTuber Shane Dawson were also recently targeted in similar attacks on Twitter.

Twitter was not immediately available to comment.

— CNBC's Salvador Rodriguez contributed to this report.