Pcornel
Browse topics
Options
Recent
Favorites
Security · Technical reference

Web Security

Direct answer

Web security protects web applications and their users from attacks such as XSS, SQL injection, CSRF and SSRF, using secure coding, HTTPS, secure cookies, security headers and strong authentication.

When to use this

Use this when securing web applications against XSS, injection, CSRF, SSRF and session attacks.

First 30 seconds

1. Web security: HTTPS, authentication, session management, input handling, access control, headers.

2. OWASP Top 10 as baseline.

3. Test with SAST/DAST.

4. Fix root causes.

5. WAF as an extra layer.

Operational verification

request → TLS → auth/session → validation → access control → response

Context & applicabilityCommon mistakes · platform/version boundaries
Common mistakes
Common mistakes
  • Testing security only before launch, not continuously.
  • Relying on a WAF instead of fixing the application.
  • Front-end checks without server-side validation.
  • Dependencies never updated (check with npm audit, pip-audit, composer audit).
Platform / version applicability
Security architecture and operations
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

PlatformSecurity architecture and operations
Scope / prerequisiteUse this when securing web applications against XSS, injection, CSRF, SSRF and session attacks.
What next?3 suggested next steps
Child topics (this level)18
Evidence1
On this pageJump to a specific section
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

1 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

Capture the concrete output, symptom, packet, log or counter before changing anything.

Step 1 Testing tools Verify boundary
ToolUse
OWASP ZAPProxy and automated scanning
Burp SuiteManual testing proxy
securityheaders.com / Mozilla ObservatoryHeader checks
SSL LabsTLS configuration grade
Semgrep, CodeQLStatic analysis in CI
Evidence references

Evidence · 1 on this Topic

Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.

observation · 1
Drill down

Subtopics

Go one level deeper into this subject.

Subtopic HTTP Security

HTTP security covers protecting web traffic and responses: HTTPS everywhere, security headers, secure cookies, correct methods and status codes, and limiting what error pages reveal.

Subtopic HTTPS

HTTPS is HTTP over TLS, encrypting and authenticating web traffic with a certificate for the site's domain.

Subtopic Authentication

Web authentication verifies users with passwords plus MFA, passkeys or SSO, with rate limiting, secure password storage, generic error messages and protection against credential stuffing.

Subtopic Session Security

Session security protects the link between a user and their login: random, long session IDs, regenerated at login, sent only in secure cookies, with idle and absolute timeouts and server-side logout.

Subtopic Cookies

Cookies store session and state data in the browser. Mark session cookies Secure, HttpOnly and SameSite, scope them to the right domain and path, and give them sensible lifetimes.

Subtopic SameSite

SameSite is a cookie attribute that controls cross-site sending: Strict, Lax (the browser default) or None, which requires Secure.

Subtopic CORS

CORS (Cross-Origin Resource Sharing) uses response headers like Access-Control-Allow-Origin to let browsers allow specific other origins to read responses.

Subtopic CSRF

CSRF (cross-site request forgery) makes a logged-in user's browser send unwanted requests to a site.

Subtopic XSS

XSS (cross-site scripting) injects malicious script into pages viewed by other users, stealing sessions or acting as them.

Subtopic SQL Injection

SQL injection inserts SQL through user input to read, change or delete database data.

Subtopic Command Injection

Command injection happens when user input reaches an operating system shell, letting attackers run commands.

Subtopic Path Traversal

Path traversal uses sequences like ./ in file names to read or write files outside the intended folder.

Subtopic SSRF

SSRF (server-side request forgery) tricks a web server into making requests to internal services or cloud metadata, such as 169.254.169.254.

Subtopic Insecure Deserialization

Insecure deserialization turns untrusted serialized data back into objects in a way that lets attackers run code or change logic.

Subtopic Security Headers

Security headers instruct browsers to apply protections: Content-Security-Policy, Strict-Transport-Security, X-Content-Type-Options: nosniff, Referrer-Policy, Permissions-Policy and frame-ancestors or X-Frame-Options.

Subtopic Content Security Policy

Content Security Policy (CSP) is a response header that restricts where scripts, styles, images and frames may load from, such as script-src 'self', which greatly limits the impact of XSS.

Subtopic HSTS

HSTS (HTTP Strict Transport Security) tells browsers to always use HTTPS for a domain for a set time, such as max-age=31536000; includeSubDomains, preventing SSL stripping attacks.

Subtopic Web Security Troubleshooting

Troubleshoot web security by inspecting response headers and cookies in browser developer tools, reading CSP violation reports, testing with a proxy like Burp or ZAP, and checking server and WAF logs.

Key points
  • Validate input; encode output.
  • Authorization must be checked server-side on every request.
  • Security headers reduce impact of bugs.
Key checks
  • curl -sI https://<site> — headers
  • DAST scan (OWASP ZAP) — findings
  • SAST/dependency scan — code issues
ReferenceWhy it matters1 section · depth on demand

What this area covers

TopicAnswers
HTTPS, HSTS, security headers, CSPTransport and browser protections
Authentication, sessions, cookies, SameSiteKeeping logins safe
CORS, CSRFCross-origin rules
XSS, SQL/command injection, path traversal, deserialization, SSRFInput-handling flaws

Use the OWASP ASVS as a checklist and test with OWASP ZAP or Burp Suite.

ReferenceImportant terms & boundaries1 section · depth on demand

In depth

Web security protects web applications and their users from attacks such as injection, cross-site scripting, request forgery and session hijacking. Web apps are exposed to the internet and handle authentication and data, making them one of the most attacked surfaces.

Defences work at several layers:

LayerControls
TransportHTTPS everywhere, HSTS
Application codeInput validation, output encoding, parameterised queries
Browser policiesContent Security Policy, SameSite cookies
SessionsSecure cookie flags, timeouts, rotation
PerimeterWAF, rate limiting, bot protection
ProcessSecure development, code review, testing

The topics in this group explain each major vulnerability class and the specific controls that prevent it.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor docSecurity architecture and operations current

Authoritative/upstream documentation reviewed for bounded claims in Web Security. Documentation verification only; this is not observed lab or production Evidence.

Basis: https://owasp.org/www-project-application-security-verification-standard/ · confidence 94%
Confirmation

Confirm action

Continue?