Ms Harman said the incident showed action was needed
Harriet Harman has revealed that fake Twitter messages have been sent in her name, including one to a senior Conservative politician.
She told MPs her Twitter account had been "hacked" into and the first she knew of it was when she was contacted by shadow minister Alan Duncan.
Mr Duncan said he got a direct message apparently from Ms Harman and replied "glad you're following me".
He told the BBC someone had previously "impersonated" him on Twitter.
Until recently, Ms Harman and Mr Duncan crossed swords - often colourfully - every week in Parliament in their roles as leader of the House of the Commons and shadow leader.
Ms Harman revealed details of the incident in response to a question in Parliament about "bogus" Twitter pages being set up in the name of MPs.
"My own account was hacked into this week and a tweet, purportedly sent by me widely - which I can assure everybody was not from me," she told by MPs.
"I actually got a response to that bogus tweet from the former shadow leader of the House of Commons who is now shadow prisons minister but I have to get back to him and tell him it was not from me.
"I would never send a tweet like that."
When contacted by the BBC, Mr Duncan said Ms Harman's comments "may explain the mystery" of a tweet he received the previous day.
"You are quite right there was an exchange in which I thought I got tweet from her. I had one, as if from Harriet Harman, saying 'is that tweeter' really you. I replied by text 'I am that tweeter' and I am glad you are following me."
Mr Duncan said he sympathised with his former sparring partner as someone had set up a fake Twitter account in his own name last summer, a matter which he was still investigating.
Ms Harman said the security of Twitter and other social media sites widely used by MPs was a serious matter.
"There is a real issue here. We have got to sort this thing out."
Earlier this month, Labour MP David Wright said his Twitter account had been "hacked into" and offensive words added to a message he had posted about the Conservatives.
And several leading politicians, including Foreign Secretary David Miliband, have had "fake" Twitter accounts created under their name.