Skip to content

02 Web Security

Welcome to:

Module 02 — Web Security

In the previous module, you learned how professional bug bounty research begins with:

Authorization
Scope
Rules
Methodology
Evidence
Reporting

Now you will build the technical foundation required to assess:

Web Applications

Web applications are one of the most important attack surfaces in bug bounty hunting.

They expose:

Pages
Forms
APIs
Authentication
Sessions
User Roles
Files
Payments
Business Workflows
Integrations

The objective of this module is not to memorize vulnerability names.

The objective is to understand:

How the
Application Works
Where Trust
Boundaries Exist
What Users
Can Control
Where Security
Assumptions May Fail

By the end of this module, you will understand how to:

  • explain basic web application architecture.

  • understand clients, servers and back-end services.

  • understand HTTP and HTTPS.

  • analyze HTTP requests.

  • analyze HTTP responses.

  • understand HTTP methods.

  • analyze headers.

  • understand cookies.

  • understand sessions.

  • understand authentication workflows.

  • investigate password reset flows.

  • understand MFA-related web flows.

  • analyze authorization.

  • test horizontal access control.

  • test vertical access control.

  • understand IDOR and BOLA concepts.

  • analyze user-controlled input.

  • understand reflected XSS.

  • understand stored XSS.

  • understand DOM-based XSS.

  • understand SQL injection.

  • understand command injection.

  • understand path traversal.

  • understand file inclusion concepts.

  • analyze file upload functionality.

  • understand CSRF.

  • understand SSRF.

  • understand open redirects.

  • identify information disclosure.

  • analyze CORS.

  • understand clickjacking.

  • understand host-header issues.

  • identify security misconfiguration.

  • test business logic.

  • test workflow controls.

  • analyze race-condition concepts.

  • validate findings safely.

  • build evidence.

  • create professional reports.

A simplified web application looks like:

Browser
HTTP Request
Web Server
Application
Database / Services
HTTP Response
Browser

As a security researcher, you need to understand what happens at each layer.

The client is commonly:

Web Browser

It handles:

HTML
CSS
JavaScript
Cookies
Local Storage
User Interaction

But remember:

Client-Side Logic
Security Boundary

Anything controlled by the browser may potentially be modified by the user.

The server processes:

Requests
Authentication
Authorization
Business Logic
Database Operations

Security-sensitive decisions should generally be enforced:

Server-Side

HTTP is the protocol used for communication between:

Client
Server

A typical request contains:

Method
Path
Headers
Cookies
Parameters
Body
GET /account/profile HTTP/1.1
Host: app.example.com
Cookie: session=abc123
User-Agent: Browser

Example:

HTTP/1.1 200 OK
Content-Type: text/html
Set-Cookie: session=abc123

The response may contain:

HTML
JSON
Redirect
Error
File

Common methods include:

GET
POST
PUT
PATCH
DELETE
OPTIONS

Do not assume:

GET = Read
POST = Secure

Security depends on application behavior.

Suppose:

POST /api/user/delete

is protected.

Ask whether:

DELETE /api/user/123

or another method behaves differently.

Method changes can reveal inconsistent controls.

Headers may include:

Authorization
Cookie
Content-Type
Origin
Referer
Host
User-Agent

Headers may influence:

Authentication
Routing
CORS
Caching
Application Logic

Parameters can appear in:

URL
Query String
POST Body
JSON
Headers
Cookies

Example:

/user?id=1001

Ask:

Can I
Modify id?

Before changing anything:

Capture
Normal Request

Understand:

Expected Input
Expected Response
Required Session
Required Role

Then modify one element at a time.

Common status codes:

200
Success
301 / 302
Redirect
400
Bad Request
401
Unauthenticated
403
Forbidden
404
Not Found
500
Server Error

Do not rely only on status codes.

Example:

403

could still return sensitive data in the response body.

Authentication answers:

Who Are You?

Common methods:

Username / Password
MFA
SSO
OAuth
Magic Link
API Token

Map:

Registration
Login
Logout
Password Reset
MFA
Remember Me
Email Verification
Account Recovery
SSO

Ask:

Can Users
Be Enumerated?
Is Rate Limiting
Present?
Are Errors
Different?
Are Sessions
Created Securely?

Example:

Unknown User:
Account does not exist

versus:

Valid User:
Incorrect password

This may reveal:

Valid Accounts

Impact depends on context.

Review:

Minimum Length
Complexity
Reuse
Reset
Lockout
Rate Limiting

Do not test in a way that disrupts legitimate users.

Rate limits may apply to:

Login
Password Reset
OTP
API Requests
Coupon Use

Test only within program rules.

Account lockout can reduce brute-force risk.

But overly aggressive lockout may create:

Denial of Service

against users.

Understand the tradeoff.

Multi-factor authentication may use:

Authenticator App
SMS
Email OTP
Hardware Key

Testing questions include:

Can MFA
Be Skipped?
Can State
Be Reused?
Can Backup Flows
Bypass MFA?

Password-reset functionality is high-value.

Map:

Request Reset
Token Created
Link Sent
Token Validated
Password Changed

Ask:

Is Token Predictable?
Does Token Expire?
Is Token Single Use?
Can User Be Changed?
Does Old Session
Remain Active?

After authentication, applications often create:

Session

represented by:

Cookie
Token
JWT

Example:

Cookie: session=abc123

That value may represent:

Authenticated
User State

Protect it.

Important attributes include:

Secure
HttpOnly
SameSite

They can reduce certain attack risks.

Session fixation occurs when an attacker can influence or preserve a session identifier across authentication.

The important question:

Does Session ID
Change After Login?

Ask:

Does Logout
Invalidate Session?
Does Old Token
Still Work?

Check how applications handle:

Multiple Devices
Password Change
MFA Reset
Account Recovery

Do existing sessions remain valid?

Authorization answers:

What Are You
Allowed to Do?

This is one of the most important bug bounty areas.

Authentication:

I Am User A

Authorization:

Can User A
Access Resource B?

Horizontal authorization controls access between users at the same privilege level.

Example:

User A
User A's Invoice

Should User B access it?

No

Vertical access control separates:

Normal User
Administrator

Ask:

Can Normal User
Reach Admin Function?

IDOR stands for:

Insecure Direct
Object Reference

Example:

GET /invoice/1001

Modify:

1001
1002

If another user’s data becomes accessible without proper authorization, you may have an access-control vulnerability.

Use:

Account A
Account B

to validate authorization safely.

Example:

Account A
Creates File
Account B
Attempts Access

In API environments, similar object-level authorization failures are often referred to as:

BOLA

or:

Broken Object
Level Authorization

Ask whether users can access restricted functions such as:

/admin/delete-user
/api/admin/export
/management/settings

even if the UI hides them.

37 — Hidden UI Does Not Equal Authorization

Section titled “37 — Hidden UI Does Not Equal Authorization”

A button hidden with JavaScript does not prove:

Server-Side
Authorization

Always test the request itself.

Example:

{
"user_id": 1001,
"role": "user"
}

Ask:

Can role
Be Changed?

But do not assume the server trusts it.

Validate.

User input may reach:

HTML
Database
Operating System
File System
Backend Services

Vulnerabilities can occur when input crosses trust boundaries unsafely.

Injection occurs when user input is interpreted as:

Code
Query
Command
Structure

rather than only:

Data

XSS occurs when attacker-controlled input executes as:

JavaScript

in another user’s browser.

Major categories:

Reflected
Stored
DOM-Based

Input appears immediately in the response.

Conceptually:

Input
Response
Browser Execution

Payload is stored server-side and later shown to users.

Example areas:

Comments
Profiles
Support Tickets
Messages

The vulnerability exists primarily in client-side JavaScript.

Flow:

User-Controlled Source
JavaScript
Unsafe Sink

Do not only ask:

Does <script>
Execute?

Ask:

Where Is Input
Inserted?
HTML?
Attribute?
JavaScript?
URL?
DOM?

Context matters.

Potential impact may include:

Action as Victim
Sensitive Data Access
UI Manipulation
Session Impact

depending on application protections and context.

SQL injection occurs when user input affects database query structure.

Conceptually:

Input
SQL Query
Unexpected
Database Behavior

Potential impact:

Read Data
Modify Data
Authentication Bypass
Database Control

depending on permissions and architecture.

Database errors may reveal:

SQL Syntax
Database Type
Query Structure

But absence of error does not mean:

No SQL Injection

Some injection vulnerabilities do not return direct results.

Researchers may observe differences through:

True / False
Behavior
Timing
Application Response

Testing must remain safe and within scope.

Command injection occurs when application input reaches:

Operating System
Command Execution

Potential impact can be severe.

Use only safe validation in authorized environments.

Path traversal may allow access outside an intended directory.

Conceptually:

Requested File
Path Manipulation
Unexpected File

File inclusion issues may allow unintended local or remote content to be loaded.

Impact varies significantly based on implementation.

Upload functionality creates significant attack surface.

Test:

Extension
Content Type
File Content
File Name
Storage Path
Access Control
Execution

Ask whether validation occurs using:

Extension
MIME Type
Magic Bytes
Content Inspection

Client-side validation alone is insufficient.

Determine:

Where Is File Stored?
Is It Public?
Can Another User
Access It?
Can It Execute?
Can It Overwrite
Existing Files?

File names may create risks involving:

Path Traversal
Overwrite
Special Characters

depending on implementation.

Cross-Site Request Forgery can cause a victim’s browser to submit an unwanted request using their authenticated session.

Typical target actions include:

Change Email
Change Password
Transfer Funds
Modify Settings

A CSRF scenario often depends on:

Authenticated Session
Predictable Request
Missing Request Validation

Modern cookie controls can affect exploitability.

SameSite controls can reduce some cross-site request behavior.

Understand whether cookies use:

Strict
Lax
None

Server-Side Request Forgery occurs when an application makes requests based on attacker-controlled input.

Conceptually:

Attacker
Application Server
Another Resource

Interesting features may include:

URL Preview
Webhooks
Image Fetch
PDF Generator
Import by URL
Cloud Integrations

Depending on environment, SSRF might access:

Internal Services
Cloud Metadata
Management Interfaces

Testing must remain carefully controlled.

An open redirect allows attacker-controlled redirection.

Example:

/login?next=https://example.net

Potential impact may involve:

Phishing
OAuth Abuse
Trust Exploitation

Severity depends on context.

Applications may reveal:

Stack Traces
Internal Paths
API Keys
Tokens
Configuration
Source Code
Internal Hostnames

Determine whether the information creates meaningful risk.

Example:

Database connection failed
at /var/www/app/config.php

This may disclose:

Internal
Implementation Details

But impact must be evaluated realistically.

JavaScript source maps can sometimes expose:

Readable Source Code
Internal Routes
Developer Comments

They may provide useful reconnaissance.

JavaScript can reveal:

API Endpoints
Hidden Features
Parameters
Feature Flags
Client Logic

Do not assume hidden endpoint means unauthorized access.

Validate server controls.

Cross-Origin Resource Sharing controls whether browsers allow another origin to access responses.

Review:

Access-Control-Allow-Origin
Access-Control-Allow-Credentials

Risk may exist if:

Untrusted Origin

can read sensitive authenticated responses.

Not every wildcard configuration is exploitable.

Context matters.

Clickjacking tricks users into interacting with a hidden or disguised interface.

Important protections include:

X-Frame-Options
Content-Security-Policy
frame-ancestors

Impact depends on whether framed pages expose:

Sensitive
State-Changing Actions

Applications may trust:

Host

to generate:

Reset URLs
Links
Routing

Improper handling can create security issues.

Example:

Reset Email
Contains URL
Built from Host Header

If attacker controls the host value, a victim could potentially receive a malicious reset link.

Validate safely.

Useful headers include:

Content-Security-Policy
Strict-Transport-Security
X-Content-Type-Options
Referrer-Policy
Permissions-Policy

Missing headers may not always represent a standalone bounty-worthy issue.

HTTPS protects data:

In Transit

between client and server.

Always inspect whether applications:

Redirect HTTP to HTTPS
Use Secure Cookies
Avoid Mixed Content

Business logic vulnerabilities occur when attackers exploit:

How the Application
Is Designed to Work

rather than a traditional technical flaw.

Example:

Select Product
Apply Coupon
Pay
Ship
Refund

Ask whether:

Steps Can
Be Skipped
Repeated
Reordered
Manipulated

Suppose request contains:

{
"product": "premium",
"price": 100
}

Ask:

Does Server
Trust Client Price?

Never assume.

Validate with controlled test values.

Potential tests:

0
Negative Number
Very Large Number
Decimal
Unexpected Type

within safe limits.

Ask:

Can Coupon
Be Reused?
Can Multiple
Coupons Stack?
Can Same User
Reuse One-Time Offer?

Test:

Can Refund
Occur Twice?
Can Refund Exceed
Original Payment?
Can Refund
Be Requested
Before Payment?

Example:

Identity Verification
Approval
Account Activation

Ask:

Can Activation
Endpoint Be Called
Before Approval?

Race conditions occur when multiple requests interact with shared state in unexpected ways.

Potential areas:

Coupon Redemption
Withdrawal
Inventory
Invite Acceptance
Rate Limits

Only test safely and within program rules.

Applications may represent states such as:

Pending
Approved
Cancelled
Completed

Ask:

Can User
Move Directly
Between States?

Requests may contain:

is_admin=false
discount=0
verified=false

Do not assume modifying them works.

Test whether:

Server Trusts
Client-Controlled State

Some frameworks automatically bind user-supplied fields to server-side objects.

Potential issue:

{
"name": "Alice",
"role": "admin"
}

if sensitive attributes are unintentionally accepted.

Examples include:

Debug Mode
Default Credentials
Exposed Admin Panel
Directory Listing
Public Storage
Verbose Errors

Impact depends on what is exposed.

Never aggressively attempt common credentials on real targets unless explicitly allowed.

Use training environments for such testing.

Debug pages may expose:

Environment Variables
Configuration
Secrets
Internal Paths

Treat any discovered sensitive information carefully.

Possible exposed files:

config.bak
database.sql
app.zip
.env

If found within scope, minimize access and report responsibly.

Modern web applications often call APIs.

Browser UI:

Button
JavaScript
API Request

Therefore always inspect:

Underlying API

The UI may prevent:

User B
Accessing User A

but the API may not.

Test the actual server request.

A powerful methodology is:

User
Premium User
Admin

Compare:

Requests
Endpoints
Parameters
Responses

Differential testing compares:

Authorized Behavior
vs
Unauthorized Behavior

Example:

Account A
Own Resource
Account B
Same Request

Compare:

Status Code
Response Length
Fields
Timing
Headers

Small differences may reveal hidden application behavior.

A manual testing workflow may look like:

Capture Request
Send Baseline
Modify Input
Compare Response
Document Result

Changing:

Cookie
User ID
Method
Parameter
Header

all at once makes it difficult to know:

What Caused
the Result

Change one variable where practical.

Create:

Web_Attack_Surface.md

with:

# Authentication
# Authorization
# User Profile
# Files
# Payments
# Search
# Admin
# APIs
# Integrations
# Webhooks

Create:

Web_Endpoint_Register.csv

with:

Endpoint Method Authentication Role Parameters Function

Create:

Authorization_Matrix.csv

with:

Function Guest User Premium Admin

Use this to identify:

Expected
Access Boundaries

Create:

Input_Register.csv

with:

Input Endpoint Context Server Use Test Status

Create:

Session_Test_Register.csv

covering:

Login
Logout
Password Change
MFA
Session Rotation
Session Expiry

Create:

Web_Vulnerability_Candidates.csv

with:

Candidate Endpoint Evidence Impact Status

For each potential vulnerability collect:

Baseline Request
Modified Request
Baseline Response
Modified Response
User Role
Application State

Before reporting ask:

Can I
Reproduce It?
Is It
In Scope?
Is It
Unauthorized?
Does It
Create Impact?
Is My Evidence
Minimal and Clear?

Account A:

Creates:
Project 5001

Account B:

GET /api/projects/5001

If response returns:

Account A's
Private Project

you have strong evidence of broken authorization.

Changing ID
Returns 200

is not enough.

Maybe response says:

Project not found

inside a 200 response.

Inspect actual content.

You need to establish:

Input Controlled
Unsafe Rendering
Script Execution

within the relevant context.

Establish:

Input
Changes
Server Interpretation

without causing unnecessary harm.

Document:

Expected Workflow
Tested Variation
Observed Result
Unauthorized Impact

Ask:

Who Can Exploit?
Authentication Needed?
What Data?
What Action?
How Many Users?
Repeatable?

Sometimes one issue becomes more significant when chained with another.

Example:

Information Disclosure
Valid User ID
Authorization Failure
Sensitive Record Access

Do not exaggerate hypothetical chains.

Only report chains you can safely demonstrate or clearly support.

Create:

Web_Security_Notebook.md

with:

# Target
# Application Map
# Accounts
# Roles
# Endpoints
# Authentication
# Sessions
# Authorization
# Input Testing
# Business Logic
# Vulnerability Candidates
# Evidence
# Reports

Use:

Understand Application
Map Features
Map Roles
Capture Requests
Build Baseline
Create Hypotheses
Modify
Compare
Validate
Report

Avoid:

Open Scanner
Scan Website
Submit Findings

Instead:

Understand
Test
Validate

Do not test only:

Payload Lists

You may miss:

Authorization
Business Logic
State
Workflow
Role Boundaries

which often produce high-value findings.

Use the application normally.

Ask:

What Can
This User Do?
What Data
Does This User Own?
What Should
This User
Never Access?

Then ask:

Can User B
Interact with
User A's Objects?

Ask:

Which Functions
Are Admin-Only?
How Does
the Server Know
the User Is Admin?

Ask:

What Assumptions
Might Have
Been Made?

Examples:

UI Hides Button
IDs Are Hard
to Guess
User Will Follow
Workflow
Client Sends
Correct Price

Security issues often live inside these assumptions.

Practical Exercise 1 — Map a Web Application

Section titled “Practical Exercise 1 — Map a Web Application”

Using an authorized lab application, create:

Web_Attack_Surface.md

covering at least:

Authentication
Profile
Files
Search
API
Admin

Practical Exercise 2 — Capture HTTP Requests

Section titled “Practical Exercise 2 — Capture HTTP Requests”

Capture:

5 GET Requests
5 POST Requests

Document:

Method
Endpoint
Parameters
Cookies
Response

Practical Exercise 3 — Build Authorization Matrix

Section titled “Practical Exercise 3 — Build Authorization Matrix”

Create:

Guest
User A
User B
Admin

and map expected access to:

Profile
Files
Messages
Admin

Practical Exercise 4 — Two-Account Authorization Test

Section titled “Practical Exercise 4 — Two-Account Authorization Test”

Using only your own training accounts:

Account A
Creates Resource
Account B
Attempts Access

Document:

Expected Result
Observed Result

Test in a training environment:

Login
Session Creation
Logout
Password Change
Session Reuse

Practical Exercise 6 — Password Reset Mapping

Section titled “Practical Exercise 6 — Password Reset Mapping”

Document:

Reset Request
Token
Expiry
Reuse
Account Identification
Session Behavior

Identify at least:

20 Inputs

and classify their context:

HTML
Database
File
URL
API
Business Logic

Practical Exercise 8 — File Upload Assessment

Section titled “Practical Exercise 8 — File Upload Assessment”

Map:

Allowed Extensions
Content Type
Storage
Access
Authorization
Execution

without uploading harmful content.

Practical Exercise 9 — Business Logic Review

Section titled “Practical Exercise 9 — Business Logic Review”

Choose a training workflow such as:

Purchase
Coupon
Invite
Subscription

and document:

Expected Sequence
Potential Abuse Cases
Test Results

Practical Exercise 10 — Vulnerability Report

Section titled “Practical Exercise 10 — Vulnerability Report”

Write a professional report for a fictional:

Horizontal
Access-Control
Vulnerability

including:

Title
Summary
Prerequisites
Reproduction
Evidence
Impact
Remediation
  1. What is a web application?

  2. What is the difference between client and server?

  3. Why is client-side validation not a security boundary?

  4. What information exists in an HTTP request?

  5. What information exists in an HTTP response?

  6. What are common HTTP methods?

  7. Why should baseline requests be captured?

  8. Why should researchers inspect response bodies, not only status codes?

  9. What is authentication?

  10. What is authorization?

  11. What is username enumeration?

  12. Why is password reset high-value attack surface?

  13. What is a session?

  14. Why should session IDs rotate after authentication?

  15. What should happen to sessions after logout?

  16. What is horizontal access control?

  17. What is vertical access control?

  18. What is IDOR?

  19. What is BOLA?

  20. Why is two-account testing useful?

  21. Why does hiding an admin button not enforce authorization?

  22. What is injection?

  23. What is reflected XSS?

  24. What is stored XSS?

  25. What is DOM-based XSS?

  26. Why does XSS context matter?

  27. What is SQL injection?

  28. What is command injection?

  29. What is path traversal?

  30. What should be reviewed in file-upload functionality?

  31. What is CSRF?

  32. What is SSRF?

  33. What is an open redirect?

  34. What is information disclosure?

  35. What is CORS?

  36. What is clickjacking?

  37. What security issues can involve the Host header?

  38. What is business logic testing?

  39. What is workflow bypass?

  40. What is a race condition?

  41. What is mass assignment?

  42. Why should APIs underlying web interfaces also be tested?

  43. What is differential testing?

  44. Why should one variable be changed at a time?

  45. What makes vulnerability evidence strong?

  46. Why is HTTP 200 not proof of unauthorized access?

  47. Why should impact be validated before reporting?

  48. What is vulnerability chaining?

  49. Why are business logic and authorization often high-value areas?

  50. What makes web security testing methodical?

Web security testing starts with:

Understand
the Application

then:

Map
Capture
Compare
Modify
Validate

Remember:

Hidden Button
Authorization
HTTP 200
Successful Exploit
User-Controlled Input
Vulnerability
Interesting Error
Security Impact
Tool Finding
Confirmed Bug

A strong Bug Bounty Hunter thinks in:

Users
Roles
Objects
Requests
Inputs
States
Trust Boundaries
Business Workflows

The professional web-testing workflow is:

Application
Feature
Request
Trust Boundary
Hypothesis
Test
Evidence
Impact
Report

Web security skills are fundamental for:

Bug Bounty Hunters
Application Security Analysts
Web Penetration Testers
Security Researchers
API Security Testers
AppSec Engineers

During interviews, you should be able to explain:

How You
Map an Application
How You
Analyze HTTP
How You
Test Sessions
How You
Test Authorization
How You
Test User Input
How You
Assess Business Logic
How You
Validate Impact

The key professional skill is not simply:

Knowing
Web Vulnerability
Payloads

It is:

Understanding
How the Application
Trusts Users
Finding Where
That Trust
Can Be Broken

➡️ Next: 03 — API Security

Modern web applications increasingly rely on:

APIs

behind almost every feature.

The next module will teach you how to assess:

REST APIs
GraphQL
API Authentication
Tokens
Object-Level Authorization
Function-Level Authorization
Mass Assignment
Rate Limiting
API Enumeration
Sensitive Data Exposure
Business Logic

You will move from:

Testing
Web Pages

to:

Testing the
Application Interfaces
That Power
Web and Mobile Apps

using the methodology:

Discover Endpoint
Understand Method
Identify Parameters
Understand Identity
Test Authorization
Test Input
Test Business Logic
Validate Impact

➡️ Next: 03 — API Security