The BBC has appealed for help in keeping details of the next series of Doctor Who secret after scripts of the new run featuring Peter Capaldi in the lead role were accidentally leaked online.

Facing a foe even deadlier than the Daleks – the online spoiler – the corporation’s commercial arm, BBC Worldwide, apologised for the security lapse which gave away the secrets of Steven Moffat’s eagerly awaited opening instalment of the new series, called Deep Breath, and four other episodes.

BBC Worldwide is still investigating how the scripts became public, but it is believed they were unintentionally made available after being sent to its newly opened Latin America headquarters in Miami for translation.

It is not known how widely they were accessed before the BBC website on which they are thought to have appeared was shut down.

In a statement, it said: “BBC Worldwide is currently investigating a security issue around Doctor Who series eight where unfinished material has inadvertently been made public.

“We deeply regret this and apologise to all the show’s fans, the BBC and the cast and crew who have worked tirelessly making the series.

“We would like to make a plea to anyone who might have any of this material and spoilers associated with it not to share it with a wider audience so that everyone can enjoy the show as it should be seen on 23 August.

“We know only too well that Doctor Who fans are the best in the world and we thank them for their help with this and their continued loyalty.”

The trailer for the show’s feature-length return, Deep Breath, appeared to show the Tardis in flames with the Doctor asking his companion Clara, played by Jenna Coleman: “Clara, be my pal, tell me: am I a good man?”

BBC Worldwide’s apology reflects the irritation that will be felt by the show’s producers and showrunner Moffat, who makes a point of asking fans of Doctor Who and his other BBC1 show, Sherlock, never to give anything away at previews of the two shows.

Deep Breath will be previewed in Cardiff, where the show is made, before its screening on BBC1.

The new series will feature appearances by Keeley Hawes, Michelle Gomez, Frank Skinner, Ben Miller and Hermione Norris. Novelist and screenwriter Frank Cottrell Boyce, who wrote the opening ceremony for the London 2012 Olympics, has also scripted an episode of the new series, it was announced last week.

• To contact the MediaGuardian news desk email media@theguardian.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.