Executive Summary
Web security in 2026 faces an evolving threat landscape. Supply chain attacks surpassed 5,200 incidents, becoming the fastest-growing attack vector. Broken access control remains the most prevalent vulnerability, found in 94% of applications tested. XSS incidents declined to 3,900 as frameworks with automatic encoding (React, Angular) and CSP adoption grew, but injection attacks persist in APIs and server-side rendering. HTTPS adoption reached 95%, HSTS 62%, but CSP adoption remains low at 32% due to implementation complexity.
- Supply chain attacks grew to 5,200+ incidents in 2026, driven by compromised npm packages, malicious GitHub Actions, and dependency confusion attacks. SBOM generation and SCA scanning are now essential in CI/CD.
- Broken access control found in 94% of apps tested. IDOR, missing authorization checks, and privilege escalation remain the top web application risks in the OWASP Top 10.
- CSP adoption reached 32% but remains the most underdeployed critical security header. Frameworks like Next.js and Nuxt now include CSP configuration helpers to simplify deployment.
- Passkeys (WebAuthn/FIDO2) are replacing passwords for consumer authentication. Apple, Google, and Microsoft support passkeys natively, providing phishing-resistant authentication without shared secrets.
5,200+
Supply chain incidents
94%
Apps with access control flaws
95%
HTTPS adoption
32%
CSP adoption
Part 1: OWASP Top 10 (2026)
The OWASP Top 10 is the most authoritative list of critical web application security risks. It is updated based on data from hundreds of organizations, vulnerability scanners, and bug bounty programs. The 2026 edition reflects shifting threats: broken access control remains at the top, cryptographic failures remain critical, and supply chain attacks (software/data integrity failures) continue to rise. SSRF entered the list as cloud-native architectures expose more internal services.
Insecure design (A04) represents a fundamental shift: it recognizes that some vulnerabilities cannot be fixed by better code; they require better design. Threat modeling, secure design patterns, and abuse case analysis during the design phase prevent entire categories of vulnerabilities. Security misconfiguration (A05) reflects the complexity of modern infrastructure: cloud permissions, container security, API configurations, and HTTP headers create a vast attack surface.
OWASP Top 10 (2026)
10 rows
| Rank | Category | Prevalence | Impact | Mitigation |
|---|---|---|---|---|
| A01 | Broken Access Control | Very High (94% of apps tested) | Critical | Deny by default, enforce ownership checks, disable directory listing, log access failures, rate limit API access, invalidate sessions on logout |
| A02 | Cryptographic Failures | High | Critical | Encrypt all data in transit (TLS 1.3), encrypt sensitive data at rest (AES-256), use strong password hashing (bcrypt/Argon2), disable caching for sensitive responses |
| A03 | Injection | High | Critical | Use parameterized queries/prepared statements, ORM/ODM with parameter binding, input validation (allowlist), escape output, use LIMIT to prevent mass disclosure |
| A04 | Insecure Design | High | High | Threat modeling, secure design patterns, reference architectures, abuse case stories, unit/integration tests for security controls |
| A05 | Security Misconfiguration | Very High (90% of apps) | High | Hardened deployment process, remove unused features/frameworks, review cloud permissions, security headers, automated configuration scanning |
| A06 | Vulnerable and Outdated Components | High | High | SCA scanning (Snyk, Dependabot, Renovate), remove unused dependencies, monitor CVE databases, SBOM generation, automated updates |
| A07 | Identification and Authentication Failures | High | Critical | MFA, strong password policies, rate limit login attempts, secure session management, credential stuffing protection (breached password check) |
| A08 | Software and Data Integrity Failures | Medium | Critical | Digital signatures for software/updates, SRI for CDN resources, verified CI/CD pipelines, dependency lock files, code review for serialization |
| A09 | Security Logging and Monitoring Failures | High | High | Log all auth events, access control failures, input validation failures. Centralized logging, tamper-proof logs, alerting, incident response plan |
| A10 | Server-Side Request Forgery (SSRF) | Growing rapidly | High | Validate and sanitize all URLs, allowlist permitted domains, block internal network ranges (169.254.x.x, 10.x.x.x), disable HTTP redirects, use network segmentation |
Part 2: Cross-Site Scripting (XSS)
XSS remains one of the most common web vulnerabilities despite declining incident counts. Reflected XSS injects scripts via URL parameters that are echoed in the response. Stored XSS persists malicious scripts in the database, affecting all users who view the content. DOM-based XSS occurs when client-side JavaScript modifies the DOM with untrusted data (innerHTML, document.write, eval). Mutation XSS (mXSS) exploits browser HTML parsing differences to bypass sanitization.
Defense in depth: (1) Output encoding: convert special characters to HTML entities before inserting user data into HTML. Context-specific: HTML encoding for HTML content, JavaScript encoding for script contexts, URL encoding for URLs. (2) Content Security Policy: block inline scripts (script-src without unsafe-inline), use nonces for legitimate inline scripts, restrict script sources to trusted origins. (3) Input validation: validate and sanitize on the server side. (4) Use frameworks with auto-encoding (React JSX, Angular templates, Vue double-braces).
XSS Attack Types
4 rows
| Type | Attack Vector | Persistence | Severity | Mitigation |
|---|---|---|---|---|
| Reflected XSS | URL parameters, form inputs reflected in response | Non-persistent (single request) | High | Output encoding, CSP, input validation |
| Stored XSS | User input stored in database, rendered to other users | Persistent (stored on server) | Critical | Output encoding, CSP, input sanitization (DOMPurify) |
| DOM-based XSS | Client-side JavaScript modifies DOM with untrusted data | Non-persistent (client-side only) | High | Use textContent instead of innerHTML, avoid eval(), CSP |
| Mutation XSS (mXSS) | Browser HTML parsing mutations convert safe markup to executable | Varies | High | DOMPurify with latest rules, avoid innerHTML, CSP |
Part 3: CSRF Protection
CSRF attacks have declined significantly due to the SameSite cookie attribute (default Lax in modern browsers since 2020). However, CSRF remains relevant for: legacy applications without SameSite, APIs using cookie-based authentication, and scenarios requiring SameSite=None (cross-site embedding). The SameSite=Lax default prevents most CSRF by not sending cookies on cross-site POST requests.
CSRF prevention layers: (1) SameSite=Lax (or Strict) cookie attribute: the primary defense in 2026. (2) CSRF tokens: generate a random token per session, include in forms as a hidden field, verify on the server. The synchronizer token pattern. (3) Check Origin and Referer headers on state-changing requests. (4) Require re-authentication for sensitive actions (password change, payment). (5) Custom request headers: APIs can require a custom header (X-Requested-With) that cannot be set by simple cross-origin requests.
Part 4: Injection Attacks
Injection attacks send untrusted data to an interpreter as part of a command or query. SQL injection: malicious SQL in user input (SELECT * FROM users WHERE name = 'admin' OR '1'='1'). NoSQL injection: operator injection in MongoDB queries using operators like $gt. OS command injection: shell commands in user input. LDAP injection, XML injection, and expression language injection are less common but still present.
Primary defense: parameterized queries (prepared statements). The SQL engine treats user input as data, never as executable SQL. ORMs (Prisma, SQLAlchemy, Hibernate, Entity Framework) use parameterized queries by default. Never concatenate user input into queries. Secondary defenses: input validation (type, format, length), least privilege database accounts, stored procedures (where appropriate), and WAF rules for known injection patterns.
SSRF is the fastest-growing injection type. Cloud environments expose metadata endpoints (169.254.169.254) that return IAM credentials, API keys, and configuration. An SSRF vulnerability that fetches a user-supplied URL can access these internal endpoints. Prevention: validate URLs against an allowlist, block internal IP ranges (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16, 169.254.0.0/16), disable HTTP redirects, and use network segmentation to restrict the application server from accessing the metadata endpoint.
Vulnerability Incident Trends (2018-2026)
Source: OnlineTools4Free Research
Part 5: Content Security Policy (CSP)
Content Security Policy is the most powerful browser-side XSS mitigation. CSP tells the browser which resources it can load for a page: scripts, styles, images, fonts, frames, and network connections. A strict CSP blocks inline scripts (the primary XSS vector), restricts script sources, and reports violations. Despite its power, CSP adoption is only 32% in 2026, limited by implementation complexity and third-party script dependencies.
Implementing CSP: start with Content-Security-Policy-Report-Only to identify violations without blocking. Directives: default-src (fallback for all resource types), script-src (JavaScript sources), style-src (CSS sources), img-src (image sources), connect-src (fetch/XHR destinations), frame-ancestors (who can embed this page, replaces X-Frame-Options). Use nonces for inline scripts: script-src with a nonce value that matches the script tag nonce attribute. Avoid unsafe-inline for scripts.
CSP challenges: third-party scripts (analytics, ads, widgets) require explicit allowlisting. Inline event handlers (onclick) are blocked by strict CSP (refactor to addEventListener). Dynamic CSS-in-JS libraries may require unsafe-inline for styles (or nonces). Google Tag Manager requires careful CSP configuration. Start strict, relax only where necessary, and document every exception.
Part 6: CORS Configuration
CORS controls which origins can access your API from a browser. The Same-Origin Policy blocks cross-origin requests by default. CORS headers selectively relax this restriction. Common mistake: reflecting the Origin header as Access-Control-Allow-Origin (effectively allows any origin). Another mistake: using wildcard (*) with Access-Control-Allow-Credentials: true (browsers block this, but misconfiguration exposes the intent).
Secure CORS configuration: validate the Origin header against a strict allowlist of trusted origins. Set Access-Control-Allow-Methods to only the methods your API uses. Set Access-Control-Allow-Headers to only the headers your API requires. Use Access-Control-Max-Age to cache preflight responses and reduce OPTIONS requests. For public read-only APIs, Access-Control-Allow-Origin: * without credentials is acceptable.
CORS Configuration Scenarios
5 rows
| Scenario | Allow-Origin | Credentials | Risk | Use Case |
|---|---|---|---|---|
| Same-origin only | Not set | N/A | None | Internal APIs, no cross-origin access needed |
| Specific origin | https://app.example.com | true | Low | SPA + API on different domains |
| Multiple origins | Varies (validated against allowlist) | true | Low-Medium | API used by multiple frontends |
| Public API | * | false (required) | Medium | Public read-only APIs, CDN resources |
| Wildcard with credentials | * with credentials | Blocked by browser | Critical vulnerability | NEVER — browsers reject this combination |
Part 7: Security Headers
Security headers instruct browsers to enable security features. Critical headers: HSTS (force HTTPS), CSP (XSS prevention), X-Content-Type-Options (prevent MIME sniffing), X-Frame-Options (prevent clickjacking). Medium priority: Permissions-Policy (restrict browser features), Referrer-Policy (control referrer leakage), COOP/CORP (cross-origin isolation). Set headers at the web server or framework level. Test with securityheaders.com.
HSTS (Strict-Transport-Security) prevents SSL stripping attacks by forcing HTTPS for all future connections. Once set, the browser refuses to load the site over HTTP. Include subdomains and register for the HSTS preload list (browsers will enforce HTTPS before the first visit). This is the most impactful security header with the least effort to implement.
Security Headers Reference
8 rows
| Header | Purpose | Priority | Adoption |
|---|---|---|---|
| Content-Security-Policy (CSP) | Controls which resources the browser can load for a page. Mitigates XSS, clickjacking, and data injection. | Critical | 32% |
| Strict-Transport-Security (HSTS) | Forces HTTPS connections. Prevents SSL stripping attacks. Includes subdomains and preload list registration. | Critical | 62% |
| X-Content-Type-Options | Prevents MIME type sniffing. Browser must use the declared Content-Type. Mitigates drive-by download attacks. | High | 68% |
| X-Frame-Options | Controls whether the page can be embedded in iframes. Prevents clickjacking attacks. Being replaced by CSP frame-ancestors. | High | 60% |
| Permissions-Policy | Controls which browser features (camera, microphone, geolocation, payment) the page can use. Limits third-party script capabilities. | Medium | 24% |
| Referrer-Policy | Controls how much referrer information is sent with requests. Prevents leaking sensitive URLs to third parties. | Medium | 45% |
| Cross-Origin-Opener-Policy (COOP) | Isolates the browsing context to prevent cross-origin attacks like Spectre. Required for SharedArrayBuffer. | Medium | 12% |
| Cross-Origin-Resource-Policy (CORP) | Controls which origins can load a resource. Prevents cross-origin resource leaks. | Medium | 10% |
Security Header Adoption (2020-2026)
Source: OnlineTools4Free Research
Part 8: Authentication Security
Authentication is the first line of defense. Weak authentication enables account takeover, data theft, and privilege escalation. The 2026 authentication landscape: passkeys (WebAuthn/FIDO2) are replacing passwords for consumers, OAuth 2.0 + PKCE is standard for web and mobile apps, and MFA adoption is growing but still below 50% for most services. Credential stuffing remains a top threat vector.
Password security: hash with Argon2id or bcrypt (never MD5/SHA). Check against breached password lists (HaveIBeenPwned API). Enforce minimum length (8+ characters) but avoid complexity rules (users create predictable patterns). Rate limit login attempts. Lock accounts after repeated failures. Require MFA for all accounts. Monitor for credential stuffing (unusual login patterns, geographic anomalies).
Passkeys: the future of consumer authentication. Passkeys use public-key cryptography: the private key stays on the device (phone, laptop), the server stores only the public key. Phishing-resistant (bound to origin, cryptographic verification). No shared secret to steal. Biometric-protected (Face ID, fingerprint). Synced across devices via Apple Keychain, Google Password Manager, or 1Password. Supported by Apple, Google, and Microsoft platforms.
Part 9: Supply Chain Security
Supply chain attacks target the software components your application depends on. Attack vectors: compromised npm/PyPI packages (typosquatting, account hijacking), malicious GitHub Actions, compromised Docker images, dependency confusion (private package names on public registries), and compromised build tools. A single compromised dependency can affect millions of downstream applications.
Defenses: (1) Lock dependencies with lock files (package-lock.json, yarn.lock). (2) Audit dependencies regularly (npm audit, Snyk, Dependabot). (3) Use Subresource Integrity (SRI) for CDN-loaded scripts. (4) Verify package signatures. (5) Generate and maintain SBOMs. (6) Pin GitHub Actions by SHA, not tag. (7) Use a private registry or proxy (Verdaccio, Artifactory). (8) Review dependency updates before merging. (9) Minimize dependencies. (10) Monitor for typosquatting (names similar to popular packages).
Part 10: Security Scanning Tools
Security scanning in CI/CD catches vulnerabilities before they reach production. Three categories: SAST (static analysis of source code), DAST (dynamic testing of running applications), and SCA (dependency vulnerability scanning). Use all three for comprehensive coverage. SAST and SCA run on every PR; DAST runs against staging. Container scanning (Trivy) checks Docker images for OS and library vulnerabilities.
Security Scanning Tools Comparison
6 rows
| Tool | Type | Pricing | Features | Best For |
|---|---|---|---|---|
| Snyk | SCA + SAST + Container | Free tier + paid | Dependency scanning, code analysis, container scanning, IaC scanning, license compliance | Developer-friendly vulnerability scanning |
| Dependabot | SCA | Free (GitHub) | Automated dependency updates, security alerts, grouped updates | GitHub projects, automated patch PRs |
| OWASP ZAP | DAST | Free (open source) | Active/passive scanning, API scanning, authentication, scripting | Dynamic application security testing |
| Trivy | Container + SCA + IaC | Free (open source) | Container image scanning, filesystem scanning, K8s scanning, SBOM | Container and infrastructure scanning |
| SonarQube | SAST | Free Community + paid | Code quality, security hotspots, taint analysis, duplication detection | Code quality + security analysis |
| Burp Suite | DAST + Manual | Community (free) + Pro (paid) | Proxy, scanner, intruder, repeater, decoder, extensibility | Manual penetration testing, professional security audits |
Part 11: Best Practices
Prevention: (1) Use parameterized queries for all database operations. (2) Encode all output contextually (HTML, JS, URL). (3) Implement CSP with nonces (no unsafe-inline for scripts). (4) Set all security headers (HSTS, CSP, X-Content-Type-Options, X-Frame-Options). (5) Use SameSite=Lax cookies. (6) Validate all input server-side with typed schemas. (7) Use HTTPS everywhere with TLS 1.3.
Authentication: (1) Support passkeys/WebAuthn for consumer apps. (2) Require MFA for all accounts. (3) Hash passwords with Argon2id. (4) Check passwords against breached lists. (5) Rate limit login attempts. (6) Regenerate session IDs after authentication. (7) Use OAuth 2.0 + PKCE for third-party auth.
Operations: (1) Run SAST, SCA, and DAST in CI/CD. (2) Generate SBOMs for all releases. (3) Automate dependency updates (Dependabot, Renovate). (4) Conduct annual penetration testing. (5) Implement security.txt and a vulnerability disclosure policy. (6) Monitor and alert on suspicious access patterns. (7) Practice incident response with tabletop exercises.
Glossary (50+ Terms)
Cross-Site Scripting (XSS)
InjectionAn injection attack where malicious scripts are injected into trusted websites. The script executes in the victim browser with the same origin, accessing cookies, session tokens, and DOM. Three types: reflected (URL parameters), stored (database), and DOM-based (client-side manipulation). Mitigations: output encoding (HTML entities), Content Security Policy, input validation, DOMPurify for HTML sanitization.
Cross-Site Request Forgery (CSRF)
SessionAn attack that forces an authenticated user to submit unwanted requests. The attacker crafts a request (form submission, image tag) that the victim browser sends with valid session cookies. Mitigations: CSRF tokens (synchronizer token pattern), SameSite cookie attribute (Lax or Strict), checking Origin/Referer headers, requiring re-authentication for sensitive actions.
SQL Injection
InjectionAn injection attack where malicious SQL is inserted into application queries through user input. Can read, modify, or delete database data, bypass authentication, and execute OS commands. Mitigations: parameterized queries (prepared statements), ORM with parameter binding, input validation (allowlist), least privilege database accounts. Never concatenate user input into SQL strings.
Server-Side Request Forgery (SSRF)
InjectionAn attack where the server is tricked into making HTTP requests to unintended destinations. The attacker supplies a URL that the server fetches, accessing internal services (metadata endpoints, admin panels, databases) that are not directly accessible. Mitigations: URL validation (allowlist), block internal IP ranges, disable redirects, network segmentation.
Content Security Policy (CSP)
HeadersAn HTTP response header that controls which resources the browser can load for a page. Defines allowed sources for scripts, styles, images, fonts, frames, and connections. Mitigates XSS by blocking inline scripts and unauthorized script sources. Directives: default-src, script-src, style-src, img-src, connect-src, frame-ancestors. Use nonces or hashes for inline scripts. Report violations with report-uri.
HTTP Strict Transport Security (HSTS)
HeadersAn HTTP header that forces browsers to use HTTPS for all future requests to the domain. Prevents SSL stripping attacks (downgrade from HTTPS to HTTP). Directives: max-age (duration in seconds), includeSubDomains (apply to all subdomains), preload (register in browser preload list). Recommended: max-age=63072000; includeSubDomains; preload.
Cross-Origin Resource Sharing (CORS)
Browser SecurityA browser security mechanism that controls cross-origin HTTP requests. By default, browsers block requests from one origin to another (Same-Origin Policy). CORS headers (Access-Control-Allow-Origin, Access-Control-Allow-Methods) selectively relax this restriction. Preflight requests (OPTIONS) check permissions before the actual request. Never use Access-Control-Allow-Origin: * with credentials.
Same-Origin Policy (SOP)
Browser SecurityA fundamental browser security mechanism that restricts scripts from one origin from accessing resources from another origin. An origin is defined by protocol + hostname + port. Without SOP, any website could read data from your banking session. CORS, postMessage, and JSONP are controlled exceptions to SOP.
OWASP
OrganizationThe Open Worldwide Application Security Project. A nonprofit organization that produces free security resources: OWASP Top 10 (most critical web application risks), ASVS (Application Security Verification Standard), Testing Guide, Cheat Sheet Series, and tools (ZAP, Dependency-Check). The standard reference for web application security.
Authentication
IdentityVerifying the identity of a user or system. "Who are you?" Mechanisms: passwords + MFA, OAuth 2.0 / OIDC, API keys, certificates (mTLS), biometrics, passkeys (WebAuthn/FIDO2). Authentication must be followed by authorization. Common failures: weak passwords, no MFA, credential stuffing, session fixation.
Authorization
IdentityVerifying what an authenticated user is permitted to do. "What can you do?" Models: RBAC (role-based), ABAC (attribute-based), ACL (access control lists), ReBAC (relationship-based). Always enforce on the server side, never trust client-side checks. Check authorization at every endpoint. Common failure: IDOR (Insecure Direct Object Reference).
IDOR (Insecure Direct Object Reference)
Access ControlA type of broken access control where an attacker accesses resources by modifying object identifiers (IDs) in requests. Example: changing /api/orders/123 to /api/orders/124 to access another user order. Mitigation: always verify that the authenticated user owns or has permission to access the requested resource. Use authorization checks, not just authentication.
Multi-Factor Authentication (MFA)
IdentityRequiring two or more verification factors: something you know (password), something you have (phone, hardware key), something you are (biometrics). TOTP (time-based one-time passwords) via authenticator apps. FIDO2/WebAuthn hardware keys (YubiKey) are phishing-resistant. SMS-based MFA is weakest (SIM swapping). MFA prevents 99.9% of account compromise attacks.
Passkeys (WebAuthn/FIDO2)
IdentityA passwordless authentication standard using public-key cryptography. The private key stays on the user device (phone, laptop, hardware key). The server stores only the public key. Phishing-resistant (bound to origin), no shared secrets, biometric-protected. Supported by Apple, Google, Microsoft. Replaces passwords for consumer authentication.
JWT (JSON Web Token)
TokensA compact token format containing claims signed with HMAC or RSA/ECDSA. Three parts: header (algorithm), payload (claims), signature. Stateless: the server verifies the signature without a database lookup. Security concerns: cannot be revoked (use short expiry + refresh tokens), sensitive data should not be in the payload (base64-encoded, not encrypted), algorithm confusion attacks (always validate alg header).
OAuth 2.0
ProtocolsAn authorization framework for granting third-party applications limited access to user resources. Grant types: Authorization Code + PKCE (web/mobile apps), Client Credentials (service-to-service), Device Code (TVs, CLIs). Issues access tokens (short-lived) and refresh tokens (long-lived). OIDC (OpenID Connect) adds authentication (ID token) on top of OAuth 2.0.
TLS (Transport Layer Security)
EncryptionA cryptographic protocol securing data in transit. TLS 1.3 (current) removed weak ciphers, reduced handshake latency (1-RTT, 0-RTT resumption), and mandates forward secrecy. TLS 1.2 is still acceptable; TLS 1.0/1.1 are deprecated. Certificate management: Let us Encrypt (free, automated), certificate pinning (mobile), and Certificate Transparency logs.
bcrypt
EncryptionA password hashing function designed to be computationally expensive (slow). Uses a salt and configurable work factor (cost). Bcrypt at cost 12 takes ~250ms to hash. Alternatives: Argon2id (memory-hard, recommended by OWASP), scrypt (memory-hard). Never use MD5, SHA-1, or SHA-256 for password hashing (too fast, enables brute force).
Argon2
EncryptionThe winner of the Password Hashing Competition (2015). Three variants: Argon2d (GPU-resistant), Argon2i (side-channel-resistant), Argon2id (hybrid, recommended). Memory-hard: requires significant RAM, making GPU/ASIC attacks expensive. Parameters: memory cost, time cost, parallelism. OWASP recommended settings: Argon2id, 19MB memory, 2 iterations, 1 parallelism.
Subresource Integrity (SRI)
Supply ChainA browser feature that verifies the integrity of resources loaded from CDNs. The script/link tag includes a hash of the expected content. If the CDN is compromised and serves modified code, the browser blocks it. Format: <script src="cdn/lib.js" integrity="sha384-abc123" crossorigin="anonymous">. Generate with openssl dgst -sha384 -binary file | openssl base64.
Content-Type Sniffing
Browser SecurityA browser behavior where the browser guesses the MIME type of a response by examining the content, ignoring the Content-Type header. Can be exploited to execute scripts from files served as images or text. Prevention: X-Content-Type-Options: nosniff header forces the browser to use the declared Content-Type.
Clickjacking
UI AttacksAn attack where a user is tricked into clicking something different from what they perceive. The attacker overlays a transparent iframe of the target site over a malicious page. The victim thinks they are clicking the malicious page but actually clicks the invisible target site (e.g., "Like" button, bank transfer). Prevention: X-Frame-Options: DENY or CSP frame-ancestors directive.
Rate Limiting
ProtectionLimiting the number of requests a client can make in a time window. Protects against: brute force attacks (login attempts), DDoS, API abuse, credential stuffing. Algorithms: token bucket, sliding window, fixed window. Return HTTP 429 with Retry-After header. Apply per IP, per user, per endpoint, and globally.
DDoS (Distributed Denial of Service)
AvailabilityAn attack that overwhelms a service with traffic from many sources (botnet). Types: volumetric (bandwidth saturation), protocol (SYN flood, UDP flood), application layer (HTTP flood, slowloris). Mitigation: CDN/WAF (Cloudflare, AWS Shield), rate limiting, auto-scaling, geo-blocking, traffic analysis. Cannot be fully prevented but can be mitigated.
WAF (Web Application Firewall)
ProtectionA firewall that filters, monitors, and blocks HTTP traffic to and from a web application. Rules detect: SQL injection, XSS, CSRF, bot traffic, known attack patterns. Deployment: cloud WAF (Cloudflare, AWS WAF), appliance (F5), or software (ModSecurity). WAF is a defense layer, not a replacement for secure coding.
SCA (Software Composition Analysis)
Supply ChainAnalyzing third-party dependencies for known vulnerabilities (CVEs), license issues, and outdated versions. Tools: Snyk, Dependabot, Renovate, npm audit, OWASP Dependency-Check. Run in CI/CD pipeline. Generate SBOM (Software Bill of Materials). Automate dependency updates with security patches.
SAST (Static Application Security Testing)
TestingAnalyzing source code for security vulnerabilities without executing it. Detects: injection flaws, hardcoded secrets, insecure cryptography, taint tracking (user input flowing to dangerous sinks). Tools: SonarQube, Semgrep, CodeQL, Checkmarx. Runs in CI/CD pipeline. Complement with DAST for runtime vulnerabilities.
DAST (Dynamic Application Security Testing)
TestingTesting a running application for vulnerabilities by sending crafted requests and analyzing responses. Detects: XSS, injection, misconfigurations, authentication flaws. Tools: OWASP ZAP, Burp Suite, Nikto. Runs against staging environment. Does not require source code access. Complement with SAST for code-level vulnerabilities.
Penetration Testing
TestingAuthorized simulated attack on a system to find security vulnerabilities. White box (full source access), gray box (partial access), black box (no access). Covers: web application, API, network, social engineering, and physical security. Results in a report with findings, severity, and remediation steps. Annual or before major releases.
Zero Trust Architecture
ArchitectureA security model that does not trust any user or system by default, regardless of network location. Principles: verify explicitly (authenticate and authorize every request), least privilege access, assume breach (monitor, detect, respond). Implementation: identity-based access, micro-segmentation, mTLS, continuous verification, no implicit trust for internal network.
Secret Management
OperationsSecurely storing, distributing, and rotating secrets (API keys, passwords, certificates, tokens). Never store secrets in code, environment variables (visible in process list), or config files committed to git. Use: HashiCorp Vault, AWS Secrets Manager, Azure Key Vault, GCP Secret Manager, Doppler. Rotate secrets regularly. Audit access.
Certificate Transparency
InfrastructureA system for monitoring and auditing SSL/TLS certificates. Certificate Authorities must log all issued certificates to public logs. Anyone can monitor logs for unauthorized certificates for their domain. Browsers require Certificate Transparency for all new certificates. Tools: crt.sh for searching certificate logs.
SBOM (Software Bill of Materials)
Supply ChainA comprehensive list of all components, libraries, and dependencies in software. Formats: SPDX, CycloneDX. Used for: vulnerability tracking, license compliance, supply chain security. Required by US Executive Order 14028 for government software. Generated by: Syft, Trivy, Docker Scout, Snyk.
Supply Chain Attack
Supply ChainAn attack that targets the software supply chain rather than the application directly. Vectors: compromised npm/PyPI packages, hijacked GitHub Actions, malicious Docker images, compromised CI/CD pipelines, dependency confusion. Growing rapidly: 5,200+ incidents in 2026. Mitigations: lock files, SRI, SBOM, signature verification, vendor evaluation.
Secure Cookie Attributes
SessionCookie attributes that improve security: Secure (HTTPS only), HttpOnly (no JavaScript access, prevents XSS cookie theft), SameSite=Lax/Strict (prevents CSRF), Path (restrict cookie scope), Domain (restrict to specific domain), Max-Age/Expires (set expiration). Modern default: Secure; HttpOnly; SameSite=Lax.
Session Fixation
SessionAn attack where the attacker sets a known session ID for the victim before authentication. After the victim logs in, the attacker uses the known session ID to hijack the session. Prevention: regenerate session ID after authentication (req.session.regenerate()), use secure session management, never accept session IDs from URL parameters.
Input Validation
PreventionVerifying that user input conforms to expected format, type, length, and range before processing. Allowlist (accept known good) is safer than blocklist (reject known bad). Server-side validation is required (client-side is easily bypassed). Use typed schemas: Zod, joi, JSON Schema. Validate: data type, length, range, format (regex), and encoding.
Output Encoding
PreventionConverting potentially dangerous characters to safe representations before inserting data into HTML, JavaScript, CSS, or URLs. HTML: < for <, & for &. JavaScript: Unicode escaping. URL: percent-encoding. Context-specific encoding is essential: HTML encoding does not protect against XSS in JavaScript contexts. Use templating engines that auto-encode.
Security Headers
HeadersHTTP response headers that instruct browsers to enable security features. Critical: Content-Security-Policy (XSS prevention), Strict-Transport-Security (HTTPS enforcement), X-Content-Type-Options (MIME sniffing prevention), X-Frame-Options (clickjacking prevention). Medium: Permissions-Policy, Referrer-Policy, COOP, CORP. Test with securityheaders.com.
Privilege Escalation
Access ControlGaining higher access privileges than intended. Vertical: regular user gains admin access. Horizontal: user A accesses user B data. Caused by: insecure direct object references (IDOR), missing authorization checks, role management flaws, default admin credentials. Prevention: enforce authorization at every endpoint, principle of least privilege.
CORS Misconfiguration
Browser SecurityInsecure Cross-Origin Resource Sharing configuration that allows unauthorized origins to access the API. Common mistakes: reflecting the Origin header as Access-Control-Allow-Origin (allows any origin), allowing null origin, using wildcards with credentials, overly permissive allowlists. Always validate against a strict allowlist of trusted origins.
Cryptographic Agility
EncryptionDesigning systems to easily swap cryptographic algorithms when vulnerabilities are discovered. Post-quantum cryptography will require replacing current algorithms. Design: abstract crypto behind interfaces, centralize algorithm selection, avoid hardcoding algorithms. NIST post-quantum standards: CRYSTALS-Kyber (key encapsulation), CRYSTALS-Dilithium (signatures).
Security.txt
OperationsA standard file (/.well-known/security.txt) that tells security researchers how to report vulnerabilities. Contains: contact information, encryption key (PGP), acknowledgment page, policy URL, preferred languages, expiration date. RFC 9116. Adopted by major organizations. Helps responsible disclosure.
Threat Modeling
DesignA structured process for identifying security threats, vulnerabilities, and countermeasures. Frameworks: STRIDE (Spoofing, Tampering, Repudiation, Information Disclosure, Denial of Service, Elevation of Privilege), PASTA (Process for Attack Simulation and Threat Analysis), Attack Trees. Performed during design phase. Inputs: architecture diagrams, data flows, trust boundaries. Output: prioritized list of threats with mitigations.
NoSQL Injection
InjectionInjection attacks targeting NoSQL databases (MongoDB, CouchDB, DynamoDB). Attacker injects operators or queries through user input. MongoDB example: { "username": { "$gt": "" }, "password": { "$gt": "" } } bypasses authentication. Prevention: input validation, typed queries, ORM/ODM with parameter binding, disable JavaScript execution in MongoDB.
Prototype Pollution
JavaScriptA JavaScript vulnerability where an attacker modifies Object.prototype, affecting all objects in the application. Via __proto__, constructor.prototype, or Object.assign with untrusted data. Can lead to: property injection, denial of service, RCE in server-side JS. Prevention: Object.create(null), input validation, Object.freeze(Object.prototype), schema validation.
Deserialization Vulnerability
InjectionExploiting insecure deserialization of untrusted data. The application deserializes attacker-controlled data, which can: execute arbitrary code, manipulate application logic, or cause denial of service. Affected: Java (ObjectInputStream), PHP (unserialize), Python (pickle), .NET (BinaryFormatter). Prevention: avoid deserializing untrusted data, use safe formats (JSON), validate before deserializing.
Content Security Policy Nonce
HeadersA random value generated per request and included in both the CSP header and inline script tags. Only scripts with a matching nonce are executed. More flexible than hash-based CSP for dynamic inline scripts. Format: Content-Security-Policy: script-src nonce-{random}. Script tag: <script nonce="{random}">. Nonce must be unpredictable and unique per request.
Secure Development Lifecycle (SDL)
ProcessIntegrating security into every phase of software development. Phases: security requirements (design), threat modeling (design), secure coding standards (implementation), security testing (SAST, DAST, SCA), security review (pre-release), incident response (operations). Shift-left: find and fix vulnerabilities early when they are cheapest to fix. Microsoft SDL and OWASP SAMM are reference frameworks.
Bug Bounty Program
ProcessA program that rewards security researchers for finding and responsibly disclosing vulnerabilities. Platforms: HackerOne, Bugcrowd, Intigriti. Defines scope (in-scope targets, out-of-scope), reward tiers (based on severity), and rules of engagement. Supplements internal security testing. Major companies (Google, Microsoft, Apple) pay $10K-$250K+ for critical vulnerabilities.
FAQ (20 Questions)
Raw Data Downloads
Citations and Sources
Try These Tools for Free
Put this knowledge into practice with our browser-based tools. No signup needed.
Hash Generator
Generate MD5, SHA-1, SHA-256, and SHA-512 hashes from text or files.
JWT Decoder
Decode and inspect JSON Web Tokens to view header, payload, and signature.
JWT Generator
Generate signed JWT tokens with custom payload, secret, and algorithm (HS256/HS384/HS512). Client-side HMAC.
Password Gen
Generate strong, secure passwords with customizable length and complexity.
HTML Entities
Encode and decode HTML entities for safe rendering in web pages.
.env Gen
Generate .env files from templates. Select services like DB, Stripe, Auth, AWS, and get properly commented environment variables.
Robots.txt
Create robots.txt files with user-agent rules, sitemaps, and crawl directives.
Related Research Reports
The Complete Guide to Cryptography & Hashing: Every Algorithm Explained (2026)
The definitive guide to cryptography and hashing in 2026. Covers symmetric (AES, ChaCha20), asymmetric (RSA, ECC), hash functions (SHA-256, BLAKE3), password hashing (Argon2, bcrypt), TLS/SSL, PKI, and post-quantum cryptography. 26,000+ words with interactive charts and embedded hash tools.
The Complete Authentication Guide 2026: OAuth2, OIDC, SAML, WebAuthn, Passkeys & MFA
The definitive authentication reference for 2026. Covers OAuth2, OIDC, SAML, WebAuthn, passkeys, and MFA. 40+ glossary, 15 FAQ. 30,000+ words.
The Complete SSL/TLS Certificates Guide 2026: Certificate Types, ACME, Let's Encrypt, TLS 1.3 & HSTS
The definitive SSL/TLS reference for 2026. Covers certificate types, ACME protocol, Let's Encrypt, Certificate Transparency, TLS 1.3, HSTS, and cipher suites. 30,000+ words.
