Vibe Coding — The New Era of Programming and Its Cybersecurity Risks
In 2025-2026, the world of programming changed radically. Vibe coding — the term coined by Andrej Karpathy in February 2025 — describes a new approach to software development where you describe what you want in natural language, and AI writes the code for you. Sounds great. But it is a cybersecurity catastrophe waiting to happen.
What is vibe coding?
Vibe coding is a programming style where the developer uses a large language model (LLM) — like Claude, GPT-5, Cursor, GitHub Copilot — to generate code by describing intent in natural language. Karpathy defines it: "You see things, say things, run things, copy paste things, and it mostly works."
The approach is revolutionary — it allows people without formal technical education to build apps, MVPs, scripts and even entire startups. This democratizes programming and accelerates innovation. But there is a dark side.
Why is vibe coding popular?
MVP in 1 hour instead of 1 week. Perfect for startups and experiments.
No need to learn Python or JavaScript for years. You describe what you want — AI does it.
Focus on the idea, not the syntax.
$20/month for AI tool vs $5000+/month for a developer.
The dangers of vibe coding
1. AI generates vulnerable code
A 2025 Stanford study showed that code written with AI assistants has 40% more vulnerabilities than human-written code. The reason? AI models are trained on legacy GitHub code — which includes millions of bugs and vulnerabilities.
Real example: A startup using vibe coding for a login page got code with classic SQL injection vulnerability. After deployment, a hacker accessed the entire database in less than 24 hours.
Typical vulnerability that AI generates:
# AI generated code — VULNERABLE
@app.route("/login", methods=["POST"])
def login():
username = request.form["username"]
password = request.form["password"]
query = f"SELECT * FROM users WHERE username='{username}' AND password='{password}'"
result = db.execute(query) # SQL Injection!
if result:
return "Logged in"
2. Hardcoded credentials and API keys
62% of analyzed vibe-coded GitHub repositories contain hardcoded credentials — passwords, API keys, AWS tokens. AI models often place placeholders like API_KEY = "your_key_here", which vibe coders replace with real keys and push to public repos.
3. Lack of input validation
AI models often generate code that accepts user input without checks. This opens the door to XSS, Path Traversal, Command Injection and dozens of other attacks.
4. Outdated dependencies and supply chain attacks
Vibe coders rarely update dependencies. AI installs packages with known vulnerabilities. In 2024-2025 we saw multiple supply chain attacks via compromised npm/PyPI packages — vibe coders were primary victims.
5. Nobody understands the code
The biggest danger is lack of understanding. Karpathy describes it: "When I get error messages, I just copy paste them with no comment, usually that fixes it."
The result? Production code that nobody on the team understands. When an incident happens at 3 AM, there is nobody to debug it. When a security patch needs to be added — nobody knows where to start.
Real case (March 2025): A vibe coder published a SaaS app on X (Twitter), boasting it was made entirely with AI. Within 48 hours the site was hacked, the database was wiped, users were compromised. The coder publicly admitted he "could not fix it" because he did not understand his own code.
How to do vibe coding safely?
For individual developers
Use .env files and git-secrets. Never put API keys in code.
At least basic security issues — SQL injection, XSS, hardcoded credentials.
Snyk, GitGuardian, Semgrep, Bandit — many have free tiers.
Ask "Why this way?". AI can explain — use it as a mentor.
For business and companies
- Establish AI code policy — which tools are allowed, how AI-generated code is reviewed before commit
- Mandatory security review on every AI-generated code before deploy
- SAST/DAST tools in CI/CD — automated scanning on every PR
- Penetration testing on vibe-coded apps before production. Learn more
- Develop Incident Response plan. See our service