Police have been called in after a fake news release was circulated to the media in which a Scottish government minister appeared to "out" himself.
The Scottish Executive said it was investigating the matter
The message, designed to look like an official news release from the Scottish Executive, was sent out on media wires.
It claimed to be a personal statement, running to 279 words, which the minister had asked to be sent out.
A Scottish Executive spokesman said: "An investigation is under way and the police have been informed."
The release had not come from official channels, he added.
Phil Robinson, chief technology officer for security firm IRM, told the BBC's news website that modern electronic communication meant information could easily be made to look like it had originated from a genuine source.
He said: "If the distribution system is automated it can take the mail, transform it into a news message and send it out.
"This is often done by sending an e-mail to a specific address which is then forwarded onwards to the right people.
"If you know how the process works, you know how to exploit it, if you are aware of the system you can mail it to the wires."
Mr Robinson said it was very difficult to safeguard against a hoax using a legitimate system for sending out information.
He said any investigation would look at whether a user had had to provide credentials at the time of entering the data and whether the system was set up to log the IP address and connection.
"You have to trace every step, look at the source, see where it originated to try to find a log-in to the distribution system, which will hopefully tell you where it has come from," he said.
"You basically have to trace it every hop of the way back.
"I would say this almost certainly hasn't been done by chance, it sounds like someone knows the system and purposely exploited it, either from the inside or a member of the press."
Mr Robinson added that government systems were tested to ensure that their e-government processes were secure.