A new study from Beacom College shows that all automation scripts produced by top AI models like ChatGPT, Microsoft Copilot, and Google Gemini have security flaws that can be exploited. Researchers wanted to check how safe AI-generated code is, without bias from the prompts. They used the same prompts for ChatGPT, Microsoft Copilot, and Google Gemini. The tests looked at three common business tasks:
Web Scraping: Automated data collection scripts.
Email Automation: Automated messaging and notification handlers.
File Workflow Automation: File-system monitoring and management tools.
A total of nine Python scripts were made. The researchers tested the code with Anthropic’s Claude Code to see how a regular user would check AI-written scripts.
This automated review found 45 security issues, which were reduced to 17 different types. Each type was rated using the CVSS 3.1 system, linked to the OWASP Top 10, and checked against the MITRE ATT&CK framework.
Security Flaws Found in Every Script Generated
The study shows that security flaws are common to all brands, not just one. The number of vulnerabilities was similar for each platform: ChatGPT had 13 issues, Copilot had 14, and Gemini had 12, with little difference.

Out of the 17 different types of vulnerabilities found, 9 were seen in code created by all three AI models (a 53% overlap), and 14 were found in at least two platforms (an 82% overlap).
This shows that security risks are linked to the task itself, not the AI provider.

Primary Vulnerabilities Observed Across Platforms:
Server-Side Request Forgery (SSRF): Unvalidated URL parameters in every web scraper script, allowing potential attackers to probe internal networks.
Path Traversal: Unsanitized file paths across scraper, email, and file-watcher scripts.
Injection Flaws: Email header and template injection in every email automation script, enabling message tampering or phishing.
Symlink Vulnerabilities: Flaws in all file-watcher scripts leading to arbitrary file manipulation.
Broad Exception Handling: Overly broad try-except blocks that silently swallow security-critical errors.
The researchers cataloged 17 distinct vulnerability classes across the generated codebase.
Catalog of the 17 unique vulnerability classes identified in the study
Catalog of the 17 unique vulnerability classes identified in the study (Image Source:arxiv.org/)
The detailed CVSS 3.1 breakdown illustrates that critical flaws span network handling, file systems, and input parsing logic:

A study showed that only 11 out of 17 types of vulnerabilities are responsible for about 80% of the risk. The most serious issues are SSRF, template injection, email header injection, and path traversal.
These weaknesses match the Lockheed Martin Cyber Kill Chain. They include initial access, execution, getting credentials, and moving laterally.
Automation scripts run with the permissions of the user or the system that runs them. A script that hasn’t been checked can access company shared drives, internal email servers, and local networks without needing extra permissions.
These risks increase when mixed with bigger threats in the AI world, like prompt injection attacks on automated coding tools or weak spots in AI workflows that can be used to attack important services.
Recommended Organizational Safeguards
Organizations should set clear limits for AI-assisted software development:
Mandate Code Reviews: Enforce security reviews for all AI-written code prior to production deployment, regardless of script complexity.
Restrict Execution Permissions: Block LLM-generated scripts from running with elevated permissions or unrestricted access to shared network drives.
Prioritize High-Severity Fixes: Utilize CVSS, OWASP, and MITRE ATT&CK mappings to remediate SSRF, path traversal, and injection flaws first.
Educate Staff: Remind developers and non-technical employees that functional code does not equate to secure code.
Related News:
InfoSecBulletin Cybersecurity for mankind
