Security Flaws Found in Every Script Generated by ChatGPT, Copilot, and Gemini
A new study found that every automation script written by ChatGPT, Microsoft Copilot, and Google Gemini contained real security flaws. Businesses that copy AI-written code into production without review risk exposing internal systems or letting attackers tamper with emails and files.
- Report priority
- High
- Targets
- Google Gemini
How it works
Researchers gave all three AI models the same coding requests for web scraping, email automation, and file monitoring, then reviewed the nine resulting scripts and found every one had exploitable flaws, most often scripts that fetch any web address a user supplies without checking where it points, and email scripts that insert user input into messages...
What to do
There is no software patch for this since it is a finding about how these AI models write code, not a bug in a specific product, so manually review any AI-generated script for those three issues before running it, and do not let such scripts run with elevated permissions or access to shared network drives.
Technical details
Researchers at Beacom College of Computer & Cyber Sciences issued identical prompts to ChatGPT, Copilot, and Gemini for web scraping, email automation, and file-workflow scripts, producing nine Python scripts. Automated review with Claude Code surfaced 45 findings, deduplicated into 17 vulnerability classes and scored under CVSS 3.1, mapped to OWASP Top 10 and MITRE ATT&CK. ChatGPT's scripts held 13 vulnerabilities, Copilot's 14, Gemini's 12; 9 of the 17 classes appeared in all three tools' output. Dominant flaw classes were server-side request forgery in every scraper script, path traversal across scraper, email, and file-watcher scripts, email header and template injection in every email script, symlink flaws in file-watcher scripts, and overly broad exception handling that silently swallows security errors.
References
- arxiv.org · 2607.20713 (2607.20713) Cyber Security News
- any.run · enterprise Cyber Security News
- zerodayinitiative.com · ZDI-26-451 Zero Day Initiative
- wid.cert-bund.de · securityadvisory CERT-Bund Advisories
- acn.gov.it · risolte-vulnerabilita-in-google-chrome-61 ACN CSIRT Italy
- acn.gov.it · vulnerabilita-in-prodotti-schneider-electric-13 ACN CSIRT Italy
- acn.gov.it · samsung-electronics-rilascia-aggiornamenti-di-sicurezza ACN CSIRT Italy
- openwall.com · 4 Openwall oss-security
- openwall.com · 7 Openwall oss-security
- openwall.com · 1 Openwall oss-security
- fortiguard.fortinet.com · FG-IR-26-145 Fortinet PSIRT
- fortiguard.fortinet.com · FG-IR-26-146 Fortinet PSIRT
- thehackernews.com · fakegit-campaign-uses-7600-github.html TheHackerNews