top of page

Are Vibe-Coded websites secure? 7 risks to check

An AI-generated website can be completed in hours instead of weeks. The interface works, users can log in, data can be stored, and the product can quickly be published online.

However, a website that functions correctly is not necessarily secure.

An application may work normally for legitimate users while still exposing API keys, allowing one account to access another user’s data, or leaving a critical endpoint accessible without authentication.

Therefore, the answer to the question “Are vibe-coded websites secure?” is:

A vibe-coded website can be secure, but it should never be assumed to be secure unless its code, APIs, access controls, and deployment configuration have been independently reviewed and tested.

Recent research into vibe-coded applications has identified recurring weaknesses such as secret exposure, unvalidated input, placeholder logic, and systemic limitations in AI-generated code. Better prompts may reduce some issues, but they do not eliminate security risks.

are-vibe-coded-websites-secure
7 risks to check when vibe coding website

Below are 7 risks that should be reviewed before an AI-generated website is deployed to production.

1. Exposed API keys and secrets

To quickly connect an application to a database, payment gateway, email platform, or AI service, a coding assistant may insert credentials directly into the source code or configuration files.

Exposed secrets may include:

  • API keys;

  • database passwords;

  • JWT signing secrets;

  • OAuth client secrets;

  • webhook secrets;

  • cloud access keys;

  • private keys;

  • service account credentials.

Secrets are not exposed only when they are hardcoded in source files. They may also appear in:

  • committed .env files;

  • Git history;

  • frontend JavaScript bundles;

  • application logs;

  • source maps;

  • Docker images;

  • CI/CD configuration;

  • error messages;

  • prompts sent to AI tools;

  • screenshots.

OWASP recommends centrally managing the storage, distribution, auditing, and rotation of secrets rather than leaving credentials scattered across code and configuration files.

A common scenario

A developer asks an AI assistant to connect an application to a third-party API. The API key is stored in an environment variable, and the integration works correctly.

However, the variable is later used in frontend code. Once the application is built, the secret becomes part of the JavaScript bundle downloaded by the browser.

Anyone opening Developer Tools can read and reuse the API key.

Storing a value in .env provides no protection if the secret is ultimately sent to the browser.

Potential impact

An attacker may be able to:

  • consume services under the company’s account;

  • generate unexpected API costs;

  • read or modify data;

  • send fraudulent email;

  • create unauthorized tokens;

  • access cloud resources;

  • use the credential as an entry point for deeper compromise.

If a secret has ever been pushed to a public repository, it should be treated as compromised, even if the affected line is later deleted.

Businesses can also review IPSIP’s analysis of secrets sprawl and the risks of credentials being scattered across systems.

2. A login page does not mean authentication is secure

A complete login interface does not prove that the backend is properly protected.

AI may generate working features such as:

  • registration;

  • login;

  • logout;

  • password reset;

  • role assignment;

  • persistent sessions.

The system may still be missing:

  • login attempt limits;

  • reasonable token expiration;

  • token revocation after a password change;

  • secure password reset flows;

  • account verification;

  • multi-factor authentication;

  • secure cookie settings;

  • backend account-status checks.

OWASP recommends enforcing authentication controls on trusted systems and using centralized, proven authentication mechanisms.

The risk of frontend-only protection

A common mistake is to check authentication only in JavaScript or simply hide the admin menu from regular users.

An attacker does not need to use the interface. They can call the API directly with a script, cURL, Postman, or a security testing tool.

For example, the frontend may redirect unauthenticated users to the login page while the following endpoint still returns customer information:

GET /api/customers

If the backend does not validate a session or token, the data may remain directly accessible.

Warning signs

  • The API still responds when the token is removed.

  • Expired tokens continue to work.

  • An old token remains valid after logout.

  • Existing sessions are not revoked after a password change.

  • A password reset link can be reused.

  • The login endpoint has no rate limiting.

  • The backend trusts a role sent by the frontend.

  • The admin page is hidden, but the admin API remains accessible.

Applications using OAuth must pay particular attention to token lifecycle management. IPSIP has also covered this topic in OAuth tokens and the security backdoor many businesses fail to control.

3. Users may access data they do not own

Authentication answers the question: “Who is the user?”

Authorization answers the question: “What is the user allowed to do?”

A website may authenticate users correctly and still suffer from serious authorization flaws.

This is one of the most important risks in vibe-coded applications, especially when AI handles each screen or endpoint separately without fully understanding the business rules.

The OWASP API Security Top 10 includes Broken Object Level Authorization, Broken Authentication, and Broken Object Property Level Authorization among the most important API security risks.

Changing an ID

A user logs in and views an order at:

/orders/1001

If changing 1001 to 1002 reveals another customer’s order, the system is not properly checking resource ownership.

The same technique may apply to:

  • invoice IDs;

  • customer IDs;

  • user IDs;

  • tenant IDs;

  • file IDs;

  • project IDs;

  • ticket IDs;

  • document download URLs.

Risk in multi-tenant applications

For SaaS platforms serving multiple companies, an authorization flaw may allow tenant A to read or modify tenant B’s data.

The consequences are not limited to a technical defect. The business may face:

  • customer data exposure;

  • contractual violations;

  • reputational damage;

  • compliance incidents;

  • operational disruption;

  • customer disputes;

  • investigation and remediation costs.

AI does not always understand rules such as:

  • the requester must not approve their own request;

  • employees may only view data from their department;

  • managers may view but not delete records;

  • tenants must be strictly isolated;

  • trial accounts must not access paid features;

  • support staff must not change account ownership.

This is why authorization and business logic flaws often require manual testing rather than scanner-only assessment.

To better understand API attack surfaces, review IPSIP’s API Security resources.

4. Input is validated only in the frontend

AI often adds form validation to ensure that:

  • an email address has the correct format;

  • required fields are not empty;

  • a phone number contains only digits;

  • a value is not negative;

  • a file has an approved extension.

However, browser-side validation can be bypassed completely by sending requests directly to the API.

OWASP recommends validating all input on the server, regardless of whether client-side checks already exist.

When the backend trusts frontend data

An attacker may submit:

  • negative values;

  • values above allowed limits;

  • extremely long strings;

  • fields not present in the interface;

  • an administrator role;

  • modified transaction prices;

  • HTML or JavaScript content;

  • query payloads;

  • unusual file paths;

  • executable files;

  • oversized payloads that exhaust resources.

Vulnerabilities that may result

  • SQL Injection;

  • NoSQL Injection;

  • Cross-Site Scripting;

  • Command Injection;

  • Path Traversal;

  • Server-Side Template Injection;

  • Mass Assignment;

  • malicious file upload;

  • Server-Side Request Forgery.

The website may appear stable during normal use while remaining exploitable through deliberately modified requests.

5. AI-recommended dependencies may be unsafe

When faced with a new requirement, a coding assistant often suggests installing another package to complete the task faster.

That package may:

  • contain a known vulnerability;

  • no longer be maintained;

  • have a name similar to a popular library;

  • include unnecessary transitive dependencies;

  • use an unsuitable license;

  • have an unclear maintainer;

  • execute scripts during installation;

  • not actually exist.

The risk of AI-hallucinated packages

AI may generate a package name that sounds plausible but does not yet exist in the registry.

If the user attempts to install it without verification, an attacker may register the same name and publish malicious code.

Once installed, the malicious package may:

  • read environment variables;

  • steal tokens;

  • modify source code;

  • connect to an external server;

  • interfere with the pipeline;

  • establish persistent access.

Why vibe coding increases the risk

Users often focus only on one question:

“Did the installation command work and did the error disappear?”

If the answer is yes, the package may remain in the project without checking the author, CVEs, release history, or required permissions.

Every new dependency expands the software supply-chain attack surface. IPSIP has discussed this further in how software supply chains are attacked.

6. APIs and production configuration may be exposed

Relatively secure code does not guarantee a secure deployment environment.

A website may still expose data because:

  • the database is open to the Internet;

  • a storage bucket allows public access;

  • debug mode remains enabled;

  • CORS permits every origin;

  • source maps are publicly accessible;

  • the admin dashboard has no authentication;

  • test endpoints remain available;

  • backups are stored in public directories;

  • error responses reveal stack traces;

  • a service account has excessive permissions;

  • a demo environment uses real data.

VibeGuard research indicates that issues involving artifacts, source maps, packaging configuration, and supply-chain exposure may fall outside the detection scope of traditional scanners. (arxiv.org)

A common scenario

A sales team creates an internal customer dashboard with AI.

The tool is initially only a prototype. Later, the URL is sent through email, shared with a partner, or accidentally indexed by a search engine.

Because there is no authentication or network restriction, an internal tool becomes publicly accessible.

The issue is not necessarily a flaw in the application logic. It is a failure to review deployment configuration before release.

For cloud-hosted applications, businesses should also read:

7. AI coding agents may have excessive privileges

The risk does not exist only in the generated code. The coding agent itself can become part of the attack surface.

Depending on its configuration, an agent may be allowed to:

  • read the entire repository;

  • modify or delete files;

  • execute shell commands;

  • install packages;

  • read environment variables;

  • access databases;

  • connect to cloud services;

  • use MCP servers;

  • deploy applications;

  • interact directly with production.

If the agent reads external content containing malicious instructions, broad access can increase the potential impact.

Sources of malicious instructions may include:

  • repositories;

  • issues;

  • documents;

  • websites;

  • email;

  • API responses;

  • downloaded files;

  • package documentation.

The agent may then be manipulated into:

  • reading secrets;

  • sending data outside the organization;

  • installing malicious packages;

  • changing configuration;

  • executing dangerous commands;

  • weakening application security.

IPSIP has published related analyses:

Which vibe-coded websites carry the highest risk?

Not every project has the same risk level.

A static landing page with no accounts, stored data, or internal-system connections is generally lower risk than a multi-tenant SaaS platform.

A security assessment should be prioritized when the website:

  • has user accounts;

  • stores personal data;

  • stores customer data;

  • supports multiple roles;

  • serves multiple tenants;

  • includes an admin area;

  • processes payments;

  • provides APIs;

  • allows file uploads;

  • connects to internal systems;

  • uses AI agents;

  • performs automated transactions;

  • is used by business customers.

The key question is not:

What percentage of the code was generated by AI?

The better question is:

If this function is abused, what data could be exposed and what business process could be affected?

Warning signs that the website is not production-ready

Deployment should be paused and reviewed if:

  • no one fully understands the AI-generated code;

  • roles and permissions are undocumented;

  • APIs have never been tested outside the interface;

  • cross-account access has not been tested;

  • production shares credentials with development;

  • an AI agent can access real data;

  • secret scanning has not been performed;

  • packages were installed only because AI recommended them;

  • administrative actions are not logged;

  • no one is responsible for approving security;

  • a prototype was made public as soon as it worked.

NIST recommends integrating secure development practices throughout the software development lifecycle rather than treating security as a separate final-stage activity.

Is vulnerability scanning enough to declare a website secure?

No.

Vulnerability scanning may quickly identify:

  • outdated components;

  • certain misconfigurations;

  • exposed endpoints;

  • missing security headers;

  • some injection patterns;

  • known vulnerabilities.

However, automated tools often struggle to determine:

  • whether a user is accessing the correct data;

  • whether tenants are properly isolated;

  • whether an approval process can be bypassed;

  • whether a transaction value can be modified;

  • whether an operation can be performed twice;

  • whether an agent can be abused beyond its intended scope.

When does a vibe-coded website need penetration testing?

Penetration testing should be considered before production if the website:

  • stores sensitive data;

  • processes payments;

  • has multiple permission levels;

  • exposes APIs;

  • operates as a multi-tenant SaaS platform;

  • connects to internal systems;

  • includes an admin panel;

  • allows file uploads;

  • uses AI agents;

  • is being prepared for enterprise customers.

Penetration testing does not only determine whether code contains flaws. It evaluates how those flaws can be exploited and what real impact they may have on data or business operations.

Businesses can review:

Conclusion: Vibe-coded websites should not be trusted by default

Vibe coding does not automatically produce insecure websites.

AI can help businesses:

  • create prototypes quickly;

  • reduce repetitive work;

  • validate ideas;

  • shorten development cycles;

  • help small teams build products.

Risk appears when the speed of code generation exceeds the organization’s ability to review, test, and govern that code.

An AI-generated website should only be deployed when the team can clearly answer:

  • What data is being processed?

  • Who is allowed to access it?

  • Which APIs are public?

  • Where are secrets stored?

  • Which dependencies are in use?

  • What is the agent allowed to do?

  • Which weaknesses could affect the business?

  • Who is responsible for incident response?

A prompt asking AI to “write secure code” may help reduce some mistakes, but it does not replace code review, API testing, authorization testing, and penetration testing.

For websites handling important data or business logic, the next step should be a verifiable security process rather than asking AI to assess its own code.

----------------

Frequently asked questions

Does every AI-generated website contain vulnerabilities?

No. AI-generated websites are not automatically vulnerable. However, AI-generated code should be reviewed and tested in the same way as human-written code.

AI can help identify issues, explain code, and suggest test cases. However, it should not be used as the only control because it may miss authorization flaws, business logic weaknesses, and environment misconfigurations.

No. A scanner is useful for identifying some technical vulnerabilities, but it usually cannot fully understand permissions and business logic.

A static landing page generally does not require the same level of testing as a SaaS platform. Penetration testing should be prioritized when the website stores data, has accounts, exposes APIs, processes payments, or includes an admin area.

The website should be reassessed after major changes involving login, authorization, payments, APIs, file upload, dependencies, cloud infrastructure, or AI agents.

-------

References

Comments


follow ipsip vietnam.png
40051abd5a76713af8f015988fc6780e-blue-phone-icon-with-a-wave-on-it.webp
whatsapp-mobile-software-icon-png-image_6315991.png
pngtree-minimal-calendar-icon-vector-png-image_21233134.png
IPSIP logo transparent.png

IPSIP VIETNAM ONE MEMBER LIMITED LIABILITY COMPANY (IPSIP VIETNAM OMLLC)

Tax code: 0313859600

🏢 SH05.01, B4 Street, Saritown Area, An Khanh Ward, Ho Chi Minh City, Vietnam

​☎  +84 918 397 489

  • Linkedin
  • Facebook
  • TikTok
  • Email liên hệ
png-clipart-iso-iec-27001-information-security-management-iso-iec-27002-international-orga
soc 2 type ii

Our Services

Sign up to receive in-depth cybersecurity documents and news from IPSIP Vietnam.

bottom of page