Sir Fred Goodwin, the controversial former chief executive of the Royal Bank of Scotland, obtained a superinjunction to prevent details of his alleged extra-marital affair with a senior colleague being made public, it has been claimed in the House of Lords.

The wide-ranging gagging order – which prevented Goodwin from being identified as a banker – was brought up by Lord Stoneham, a Liberal Democrat peer, during a debate in the Lords. Stoneham's comments are protected by parliamentary privilege.

Goodwin's superinjunction was first made public during a House of Commons debate in March. However, there have been no claims about the subject matter of the injunction until now.

Stoneham, speaking on behalf of fellow Liberal Democrat peer Lord Oakeshott, said during the debate: "Would [the speaker] accept that every taxpayer has a direct public interest in the events leading up to the collapse of the Royal Bank of Scotland?

"So how can it be right for a superinjunction to hide the alleged relationship between Sir Fred Goodwin and a senior colleague? If true it would be a serious breach of corporate governance and not even the Financial Services Authority would know about it."

Lord McNally, the deputy leader of the Lords, responded: "I do not think that it is appropriate from this despatch box to comment on individual cases, some of which are before the courts."

In the ensuing debate on gagging orders, McNally said the Ministry of Justice did not know how many superinjunctions were currently in place.

"I have to confess that the Ministry of Justice do not have a figure on the number of superinjunctions," he added. "I do understand that the Ministry of Justice chief statistician is looking into the matter and we do hope to be able to give those figures shortly."

The ability of MPs and peers to undermine gagging orders issued against the media is likely to feature in a report on superinjunctions by the master of the rolls, Lord Neuberger, on Friday.

McNally said that he hoped Neuberger would address growing calls for the press to be allowed in to court when injunctions and superinjunctions are granted.

"The very fact that there is so much discussion and public debate means that it has been sensible to get the master of the rolls to look at these issues. When we have the full knowledge of his deliberations, we will be making statements on steps forward," he added.

• To contact the MediaGuardian news desk email editor@mediatheguardian.com or phone 020 3353 3857. For all other inquiries please call the main Guardian switchboard on 020 3353 2000. If you are writing a comment for publication, please mark clearly "for publication".

• To get the latest media news to your desktop or mobile, follow MediaGuardian on Twitter and Facebook