The operation was launched by MI6 in an attempt to disrupt efforts by al-Qaeda in the Arabian Peninsular to recruit "lone-wolf" terrorists with a new English-language magazine, 'The Daily Telegraph' reported.
When followers tried to download the 67-page colour magazine, instead of instructions about how to "Make a bomb in the Kitchen of your Mom" by "The AQ Chef", they were greeted with garbled computer code.
The code, which had been inserted into the original magazine by the British intelligence hackers, was actually a web page of recipes for "The Best Cupcakes in America" published by the Ellen DeGeneres chat show.
It said: "The little cupcake is big again. Self- contained and satisfying, it summons memories of childhood even as it's updated for today's sweet-toothed hipsters."
It included a recipe for the Mojito Cupcake -- "made of white rum cake and draped in vanilla buttercream" -- and the Rocky Road Cupcake -- "warning: sugar rush ahead!" By contrast, the original magazine featured a recipe showing how to make a lethal pipe bomb using sugar, match heads and a miniature lightbulb, attached to a timer.
The cyber attack also removed articles by Osama bin Laden, his deputy Ayman al-Zawahiri and a piece called "What to expect in Jihad", the report said.