ChatGPT and other chatbots ‘can be tricked into making code for cyber attacks’

24 October 2023, 16:04

The ChatGPT website
ChatGPT study. Picture: PA

Research from the University of Sheffield found scientists could manipulate chatbots into creating malicious code.

Artificial intelligence (AI) tools such as ChatGPT can be tricked into producing malicious code which could be used to launch cyber attacks, according to research.

A study by researchers from the University of Sheffield’s Department of Computer Science found that it was possible to manipulate chatbots into creating code capable of breaching other systems.

Generative AI tools such as ChatGPT can create content based on user commands or prompts and are expected to have a substantial impact on daily life as they become more widely used in industry, education and healthcare.

But the researchers have warned that vulnerabilities exist, and said their research found they were able to trick the chatbots into helping steal sensitive personal information, tamper with or destroy databases, or bring down services using denial-of-service attacks.

In all, the university study found vulnerabilities in six commercial AI tools – of which ChatGPT was the most well-known.

On Chinese platform Baidu-Unit, the scientists were able to use malicious code to obtain confidential Baidu server configurations and tampered with one server node.

In response, the research has been recognised by Baidu, which addressed and fixed the reported vulnerabilities and financially rewarded the scientists, the university said.

Xutan Peng, a PhD student at the University of Sheffield, who co-led the research, said: “In reality many companies are simply not aware of these types of threats and due to the complexity of chatbots, even within the community, there are things that are not fully understood.

“At the moment, ChatGPT is receiving a lot of attention. It’s a standalone system, so the risks to the service itself are minimal, but what we found is that it can be tricked into producing malicious code that can do serious harm to other services.”

The researchers also warned that people using AI to learn programming languages was a danger, as they could inadvertently create damaging code.

“The risk with AIs like ChatGPT is that more and more people are using them as productivity tools, rather than a conversational bot, and this is where our research shows the vulnerabilities are,” Peng said.

“For example, a nurse could ask ChatGPT to write an (programming language) SQL command so that they can interact with a database, such as one that stores clinical records.

“As shown in our study, the SQL code produced by ChatGPT in many cases can be harmful to a database, so the nurse in this scenario may cause serious data management faults without even receiving a warning.”

The UK will host an AI Safety Summit next week, with the Government inviting world leaders and industry giants to come together to discuss the opportunities and safety concerns around artificial intelligence.

By Press Association

More Technology News

See more More Technology News

Peter Kyle speaks to the press outside Broadcasting House in London

UK will not pit AI safety against investment in bid for growth, says minister

Molly Russell who took her own life in November 2017 after she had been viewing material on social media

UK going ‘backwards’ on online safety, Molly Russell’s father tells Starmer

Ellen Roome with her son Jools Sweeney

Bereaved mother: Social media firms ‘awful’ in search for answers on son’s death

A remote-controlled sex toy

Remote-controlled sex toys ‘vulnerable to attack by malicious third parties’

LG AeroCatTower (Martyn Landi/PA)

The weird and wonderful gadgets of CES 2025

Sinclair C5 enthusiasts enjoy the gathering at Alexandra Palace in London

Sinclair C5 fans gather to celebrate ‘iconic’ vehicle’s 40th anniversary

A still from Kemp's AI generated video

Spandau Ballet’s Gary Kemp releases AI generated music video for new single

DragonFire laser weapon system

Britain must learn from Ukraine and use AI for warfare, MPs say

The Pinwheel Watch, a smartwatch designed for children, unveiled at the CES technology show in Las Vegas.

CES 2025: Pinwheel launches child-friendly smartwatch with built in AI chatbot

The firm said the morning data jumps had emerged as part of its broadband network analysis (PA)

Millions head online at 6am, 7am and 8am as alarms go off, data shows

A mobile phone screen

Meta ends fact-checking on Facebook and Instagram in favour of community notes

Mark Zuckerberg

Meta criticised over ‘chilling’ content moderation changes

Apps displayed on smartphone

Swinney voices concern at Meta changes and will ‘keep considering’ use of X

sam altman

Sister of OpenAI CEO Sam Altman files lawsuit against brother alleging sexual abuse as child

OpenAI chief executive Sam Altman with then-prime minister Rishi Sunak at the AI Safety Summit in Milton Keynes in November 2023

OpenAI boss Sam Altman denies sister’s allegations of sexual abuse

A super-resolution prostate image

New prostate cancer imaging shows ‘extremely encouraging’ results in trials