ΣύνδεσηΕγγραφή
A02 · 2025

Security Misconfiguration

Unsafe defaults, missing headers, or files that should not be public.

What it is

The code can be correct and the app still unsafe because of how it is set up: debug mode left on, default passwords, directory listing, missing security headers, or a CORS rule that lets any site read responses.

What can happen

Example: CORS and security headers

✕ Vulnerable
// Reflects ANY origin and sends cookies: every site can read your API.
app.use(cors({ origin: true, credentials: true }));
// No helmet: no CSP, no X-Frame-Options, X-Powered-By leaks "Express".
✓ Fixed
import helmet from "helmet";

app.use(helmet());
// Only your own frontend may read responses with cookies.
app.use(cors({ origin: env.CLIENT_URL, credentials: true }));

Keep one exact origin (no trailing slash) per environment, loaded from env.

How to prevent it

What CrimsonScan checks

Detected by CrimsonScan

Good fit for a URL scan. The light scan (Nuclei misconfig and exposure templates) finds exposed files and panels, missing headers and weak TLS. The heavy scan (ZAP) adds cookie flags and CSP checks.

Read more on owasp.org ↗