Common Web Vulnerability Classes
Bug Bounty Methodology · Bug Bounty track
6 min read
In this module
The Vulnerabilities You'll Find Most Often
Bug bounty reports cluster around a fairly small number of vulnerability classes. Get to know each one — how it arises, where to look, how to confirm it — and you swap a chaotic, hopeful search for a methodology you can apply across targets.
Cross-Site Scripting (XSS)
XSS happens when an application drops untrusted data into its HTML output without proper encoding, letting an attacker run JavaScript in someone else's browser.
Reflected XSS - the payload is included in the request (typically a URL parameter) and reflected in the response:
GET /search?q=<script>alert(document.domain)</script> HTTP/1.1Stored XSS - the payload is saved by the application (database, file) and rendered to other users when they view the content. Stored XSS in profiles, comments, or messages is higher severity because the victim only has to do what they were going to do anyway: browse the site.
DOM-based XSS - the vulnerability exists in client-side JavaScript that processes untrusted input and writes it into the DOM:
// Vulnerable: reads from URL fragment and writes to innerHTMLdocument.getElementById('output').innerHTML = location.hash.substring(1);When testing for XSS, check every input that comes back in the response. Pay close attention to context: inside an HTML tag, inside an attribute, inside a <script> block, inside a URL. Each context wants a different payload.
The diagram shows the same reflected value landing in four places. For each one, find the character that ends the context you're stuck in: that's what the application has to encode, and what your payload has to smuggle through.
The URL case is the one that catches people out: HTML-encoding the value does nothing to javascript:alert(1), so the fix there is to allow only http: and https: schemes.
Server-Side Request Forgery (SSRF)
SSRF happens when an application fetches a URL provided by the user and an attacker controls where it points. The result: an attacker can make requests from the server's network position, reaching internal services, cloud metadata endpoints, or localhost-only interfaces that should never be reachable from the public internet.
POST /api/fetch-preview HTTP/1.1Content-Type: application/json
{"url": "http://169.254.169.254/latest/meta-data/iam/security-credentials/"}On AWS, that one request is often the whole game. The older metadata service, IMDSv1, answers any plain GET from the instance, and the credentials path hands back temporary keys for the instance's IAM role. IMDSv2 requires a session token first, fetched with a PUT and a custom header, which most SSRF bugs can't send.
SSRF turns up wherever an application processes URLs: link previews, PDF generators, webhook configuration, file import from URL, image fetching. The OWASP API Security Top 10 2023 lists SSRF as API7, and it earned that placement honestly — modern API-driven apps are full of it.
IDOR and BOLA
Insecure Direct Object References (IDOR) — known in the OWASP API Top 10 2023 as Broken Object Level Authorisation (BOLA / API1) — happens when an application hands out internal object identifiers but forgets to check whether the requesting user is actually allowed to touch the object behind that identifier.
GET /api/v1/users/1234/profile HTTP/1.1Authorization: Bearer <token_for_user_5678>If user 5678's token can access user 1234's profile, you've got an IDOR. Test by creating two accounts, capturing a valid request for one, and swapping the object identifier with the other account's.
Broken Object Level Authorisation tops the OWASP API Security Top 10 2023 as API1. It is the single most reported vulnerability class in API-focused bug bounty programmes. Every API endpoint that accepts an object identifier (user ID, order number, document ID) is a potential BOLA target. Systematic testing of every endpoint with cross-account identifiers is one of the highest-yield testing strategies.
Cross-Site Request Forgery (CSRF)
CSRF tricks a victim's browser into making an authenticated request to a vulnerable application. If the application leans purely on cookies for authentication and skips CSRF token validation, an attacker can build a malicious page that quietly submits forms as the logged-in victim.
<!-- Malicious page that changes the victim's email --><form action="https://target.com/settings/email" method="POST"> <input type="hidden" name="email" value="attacker@evil.com" /></form><script>document.forms[0].submit();</script>CSRF is on the decline, mostly because of cookie defaults. Chrome and other Chromium browsers treat a cookie with no SameSite attribute as SameSite=Lax, so it isn't sent on a cross-site POST like the one above, and frameworks ship CSRF tokens by default. Firefox and Safari don't apply the same Lax default, though, and any cookie explicitly set with SameSite=None is still exposed, so CSRF still lurks in older codebases and bespoke systems.
JSON APIs need a separate check. A plain HTML form can't send Content-Type: application/json, and a cross-site fetch with that header triggers a CORS preflight the attacker can't pass. If the server ignores the content type and parses a text/plain or form-encoded body as JSON anyway, the protection disappears, so test that before writing the endpoint off.
Open Redirect
An open redirect happens when an application takes a URL parameter and redirects the user there without validating it:
GET /login?redirect=https://evil.com HTTP/1.1An open redirect on its own is usually low severity. The value goes up sharply when you chain it. Redirect an OAuth callback to an attacker-controlled server, for example, and a sleepy P5 finding suddenly becomes a token-theft P1.
Information Disclosure
Information disclosure covers any unintentional exposure of sensitive data. That includes:
- Verbose error messages revealing stack traces, database queries, or internal paths
- Exposed configuration files (
.env,config.yml,.git/directories) - Debug endpoints left enabled in production (
/debug,/actuator/env,/phpinfo.php) - Directory listings showing file structures
- API responses returning more data than the client needs
# Check for common sensitive filescurl -s https://target.com/.envcurl -s https://target.com/.git/HEADcurl -s https://target.com/server-statusAn information disclosure finding is usually low severity in isolation, but it's also raw material for bigger attacks. An exposed .env with database credentials, or a debug endpoint coughing up API keys, can rocket from informational to critical in the space of a single curl request.
Mapping Vulnerabilities to Your Testing
Don't test at random. For each target, work through the vulnerability classes deliberately. Figure out which are most plausible given the stack, the app's functionality, and the kinds of user input flowing in. A methodical sweep finds more bugs than a scattershot one — and it leaves you with notes you can actually reuse.