High severityJavaScript / TypeScriptInsecure ConfigurationHIGH confidence
CORS Wildcard With Credentials
CORS allows any origin together with credentials, exposing authenticated responses to any website.
Standards mapping
- OWASP Top 10
- A05:2021 - Security Misconfiguration
- OWASP ASVS
- V14.5.3 (L1)
Vulnerable vs. safe
Flagged by this check
app.use(cors({ origin: "*", credentials: true }));Passes - the safe pattern
app.use(cors({ origin: "https://trusted.example.com", credentials: true }));Why it matters & how to fix it
CORS allows any origin together with credentials, exposing authenticated responses to any website. Never combine a wildcard/true origin with credentials:true; reflect a specific trusted origin instead.
References
Rule ID integsec-js-cors-wildcard-with-credentials - engine: Opengrep - license: MIT - Copyright (c) IntegSec Inc.
TurboPentest runs this check automatically
Connect a GitHub repo and this check runs on every white-box pentest - AI-validated and reported with proof, from $99 per target.
Start a pentestRelated checks
- JavaScript / TypeScript - Insecure ConfigurationCORS Acao Wildcard Header
- JavaScript / TypeScript - Insecure ConfigurationCORS Wildcard Origin
- JavaScript / TypeScript - Insecure ConfigurationCSRF Protection Disabled
- JavaScript / TypeScript - Insecure ConfigurationExpress Trust Proxy All
- JavaScript / TypeScript - Insecure ConfigurationExpress X Powered By Enabled
- JavaScript / TypeScript - Insecure ConfigurationGraphql Introspection Enabled