Web Security · React vs Old Tools
React JS vs Old Tools — What Changed for Ethical Hackers
Quick summary — what changed, what did not
React did not make the web more secure — it changed where the bugs live. Old tools still work, but the target has moved from server-rendered pages to JavaScript bundles and API endpoints. Ethical hackers who do not adapt their toolkit will miss entire classes of vulnerabilities in React apps.
In this guide you will learn:
- The old web — how ethical hackers tested pages and forms.
- What React changed — SPAs, client-side routing and API-first apps.
- The new attack surface — bundles, source maps, tokens and hidden endpoints.
- Which old tools still work and which new ones you need.
- A practical checklist for testing a React app end to end.
SECTION 01The old web — how ethical hackers tested it
Before SPAs, almost everything was a page. Ethical hacking was built around that model, and the toolkit reflects it:
| Old tool | What it did | Why it worked |
|---|---|---|
| Burp Suite / OWASP ZAP | Intercept requests, replay, fuzz | Every action was a full page request |
| Dirb / Gobuster | Brute-force URLs | Every route was a server file or endpoint |
| curl / wget | Send GET/POST, inspect response | HTML responses were easy to read |
| Form fuzzing | Inject payloads into forms | Every form posted to a predictable endpoint |
| View-source | Read HTML for comments, endpoints | Server rendered everything in HTML |
Old web recon looked like this:
1. Crawl the site with a proxy
→ every link is a real HTTP request
→ every form posts to /login, /register, /search
2. View-source on every page
→ find hidden fields, comments, endpoints
3. Directory brute-force
→ gobuster / dirb for /admin, /backup, /api
4. Fuzz every input
→ SQLi, XSS, command injection payloads
→ response reflects the input if vulnerable
5. Check cookies, headers, redirects
→ session handling, open redirects, missing flags
This worked because the server rendered everything.
Every route was a real server endpoint.
Old tools that STILL work on React apps:
☐ Burp Suite as an HTTP proxy
→ every fetch() call is still an HTTP request
→ intercept, replay, modify, fuzz
☐ curl / Postman
→ directly hit API endpoints
→ often the fastest way to reproduce a bug
☐ gobuster for API paths
→ /api/v1/users, /api/internal/...
→ but only if you know the API prefix
☐ Headers and cookies
→ CSRF, CORS, missing flags still matter
☐ Payload fuzzing
→ SQLi, XSS, SSRF payloads still work
→ they just go to API endpoints, not HTML forms
The tools did not become useless.
The target moved.
SECTION 02What React changed for security testing
React apps are single-page applications. That one architectural change reshapes where vulnerabilities live:
| Aspect | Old Web | React App |
|---|---|---|
| Routing | Every URL is a server request | Client-side routes, often no server call |
| Authentication | Server-side sessions, cookies | JWTs in localStorage or memory, refresh tokens |
| Business logic | Mostly on the server | Duplicated on the client — but must still be enforced on the server |
| Attack surface | Pages, forms, query strings | JS bundles, API endpoints, tokens, source maps |
| Bug bounty entry point | URL fuzzing, form fuzzing | Network tab, DevTools, JS review |
| Broken access control | Hidden admin pages | Hidden API endpoints, missing server-side checks |
What changed when apps moved to React:
☐ The page is a shell — the data lives behind APIs
☐ "View-source" shows an empty div and one script tag
☐ Routes like /admin are UI-only — the server may not know them
☐ Authorization must be checked on the API, not the route
☐ Tokens (JWT) often live in localStorage
☐ Source maps may expose the original code
☐ Hidden features exist in the JS bundle, not in HTML
☐ GraphQL endpoints replace REST in many apps
☐ CSRF is less common but still possible with cookie auth
☐ XSS moves to dangerous render paths, not reflected forms
The bug bounty entry point moved from "URL and forms"
to "network tab and JS bundle".
What did NOT change (still works the same way):
☐ SQL injection — if the API is badly built
☐ XSS — if React is bypassed with dangerouslySetInnerHTML
☐ Broken access control — if the API does not check the user
☐ IDOR — if the API returns another user's data by ID
☐ Sensitive data exposure — if the API returns too much
☐ Weak auth — if JWT is not validated or expires badly
☐ Rate limiting — if you can brute-force the API
☐ Open redirects — if the app trusts a ?next= parameter
☐ CORS misconfig — if the API trusts any origin
☐ SSRF — if the server fetches URLs from user input
React did not fix the OWASP Top 10.
It only changed the attack surface you use to reach them.
SECTION 03The new attack surface — bundles, APIs, tokens
When you test a React app, these are the four places where real findings live. Learn to read them before you start fuzzing:
| Surface | What to look for | How to inspect |
|---|---|---|
| JS bundles | Hidden routes, API prefixes, feature flags | DevTools Sources + beautifier |
| Source maps | Original source code (a real leak) | Fetch main.js.map directly |
| Network requests | Every API endpoint the app calls | DevTools Network + Burp proxy |
| Auth tokens | JWT structure, expiry, storage location | DevTools Application tab + jwt.io |
| GraphQL | Introspection, missing field-level auth | Postman / GraphiQL |
| Error messages | Stack traces, internal paths, versions | Trigger errors on purpose |
# Step 1 — open DevTools → Network
# Reload the app, filter by "JS"
# You will see something like:
# /static/js/main.4f2a1c.js
# /static/js/2.a91b12.chunk.js
# /static/js/runtime-main.js
# Step 2 — download the main bundle
curl -O https://target.com/static/js/main.4f2a1c.js
# Step 3 — beautify it
# Use jsbeautifier.org or prettier in VS Code
# Step 4 — search for useful strings
grep -oE '"/api/[^"]+"' main.js | sort -u
grep -oE 'https?://[^"]+' main.js | sort -u
grep -iE 'admin|internal|debug|feature' main.js
# Step 5 — look for feature flags or hidden routes
# Many React apps ship admin code that is hidden
# only by a client-side condition
# Source maps are often shipped by mistake
# Try the standard paths:
curl -I https://target.com/static/js/main.4f2a1c.js.map
curl -I https://target.com/static/js/main.js.map
# If you get a 200, you just downloaded
# the original, unminified source code.
# Why this is a real finding:
☐ Original variable names are visible
☐ Internal API paths are revealed
☐ Comments may contain TODO or debug notes
☐ Third-party tokens may be embedded
☐ Business logic becomes readable
# Severity depends on what is exposed.
# In many bug bounty programs, exposed source maps
# are accepted as a low/medium finding.
# Reporting tip: show the exact URL and one
# snippet from the .map file as proof.
SECTION 04Old tools that still work, and new tools you need
Ethical hackers did not throw away their toolkit — they extended it. Here is the honest comparison:
| Old tool | Still useful? | New tool / addition |
|---|---|---|
| Burp Suite | Yes — core tool | Add the browser extension + proxy all XHR |
| curl / Postman | Yes — fastest replay | Import a HAR from DevTools to reproduce API calls |
| Dirb / Gobuster | Partly | Use it on API prefixes from the bundle, not HTML |
| SQLMap | Yes | Point it at API parameters, not form fields |
| View-source | Mostly no | DevTools Sources + JS beautifier instead |
| Form fuzzing | Mostly no | Fuzz the API request body / JSON fields |
| Nikto | Partly | Still useful for headers and server config |
| Nuclei | Yes | Use templates for exposed .map, common API leaks |
An ethical hacker's React-era toolkit:
Browser side
☐ Chrome DevTools — Network, Sources, Application
☐ React DevTools — component tree, props, state
☐ FoxyProxy — toggle Burp proxy quickly
☐ Wappalyzer — confirm the stack
Proxy / interception
☐ Burp Suite Community or Pro
☐ OWASP ZAP (open source alternative)
JS analysis
☐ jsbeautifier.org or Prettier
☐ Source mapper (to read .map files)
☐ grep / ripgrep for endpoint strings
API testing
☐ Postman or Insomnia
☐ curl for quick replay
☐ GraphiQL for GraphQL introspection
Token analysis
☐ jwt.io — decode JWTs
☐ jwt_tool — test for alg:none, weak secrets
Automation
☐ Nuclei — exposed .map, common API leaks
☐ ffuf — API path fuzzing
You do not need all of these.
Pick one from each category and master it.
Quick wins that catch real bugs fast:
1. Open DevTools → Network → filter "fetch/XHR"
→ every API call is here
→ copy as curl and replay in Postman
2. Open DevTools → Sources → search "api/"
→ hidden endpoints show up immediately
3. Try /main.js.map on the app root
→ if 200, source code is leaked
4. Decode the JWT in Application → Local Storage
→ check expiry, "alg", role claims
5. Try /graphql with { __schema { types { name } } }
→ if introspection is on, the whole API is exposed
6. Change the "id" in an API response URL
→ /api/users/123 → /api/users/124
→ if you get another user's data, that's IDOR
These six checks catch a huge share of React app bugs.
Do them before you start fuzzing.
SECTION 05XSS in React — what's the same, what's new
React escapes values by default. That removes some XSS — but not all of it. Here is where XSS still works in React apps:
| Scenario | Safe? | Why |
|---|---|---|
| {"{userInput}"} in JSX | Safe | React escapes by default |
| dangerouslySetInnerHTML | Vulnerable | Bypasses escaping — injection point |
| Markdown renderers | Often vulnerable | Render raw HTML from user content |
| href={`javascript:${x}`} | Vulnerable | JavaScript URLs execute on click |
| Third-party widgets | Depends | They may write to DOM directly |
| Refs + .innerHTML | Vulnerable | Direct DOM manipulation bypasses React |
// 1. dangerouslySetInnerHTML — still dangerous
// If userInput comes from an API and is not sanitised,
// this is a direct XSS.
<div dangerouslySetInnerHTML={{ __html: userInput }} />
// 2. javascript: URLs — click-based XSS
// The browser executes javascript: URLs on click.
<a href={`javascript:${userInput}`}>Click me</a>
// 3. Markdown renderers that allow HTML
// react-markdown is safe by default — but if you add
// rehype-raw or allow HTML, it becomes vulnerable.
<ReactMarkdown rehypePlugins={[rehypeRaw]}>
{userContent}
</ReactMarkdown>
// 4. Direct DOM writes bypass React entirely
ref.current.innerHTML = userInput;
// These are the places XSS still works in React.
// The default escaping does not help here.
// Safe-by-default patterns in React
// 1. Plain JSX interpolation is escaped
<p>{userInput}</p>
// 2. Attribute interpolation is escaped
<img src={safeUrl} alt={userInput} />
// 3. Sanitise before dangerouslySetInnerHTML
import DOMPurify from "dompurify";
<div dangerouslySetInnerHTML={{
__html: DOMPurify.sanitize(userInput)
}} />
// 4. Validate URL protocols before using in href
const safe = userInput.startsWith("http") ? userInput : "#";
// 5. Avoid raw HTML renderers on user content
// If you must render markdown, use a safe renderer
// without rehype-raw.
// The pattern to remember:
// React escapes by default — but the developer can turn it off.
// Every dangerouslySetInnerHTML is a place to look.
dangerouslySetInnerHTML, innerHTML and
javascript:. Every hit is a place XSS might still work —
even in a React app.
SECTION 06A practical checklist for testing React apps
Use this checklist on every React app you test. It is short, and it catches most of what old tools used to find — plus new classes of bugs.
| Phase | What to do | What you are looking for |
|---|---|---|
| Recon | Read the JS bundle, try .map files | Hidden routes, source code leak |
| API mapping | Capture every fetch/XHR in DevTools | All endpoints, auth headers, payloads |
| Auth testing | Decode JWTs, try alg:none, test expiry | Weak tokens, privilege escalation |
| Access control | Change IDs, change roles, call APIs as low-priv user | IDOR, missing server-side checks |
| Injection | Fuzz API parameters, headers, JSON bodies | SQLi, NoSQLi, command injection |
| XSS | Grep for dangerous render patterns | Stored XSS through content fields |
| GraphQL | Try introspection, test field-level auth | Data leak, unauthorized queries |
# List all JS files loaded by the app
curl -s https://target.com | grep -oE 'src="[^"]+\.js"' | sort -u
# Download the main bundle
curl -sO https://target.com/static/js/main.js
# Search for API endpoints
grep -oE '"/api/[^"]+"' main.js | sort -u
# Search for feature flags
grep -oE '"feature_[^"]+"' main.js | sort -u
# Try to fetch the source map
curl -I https://target.com/static/js/main.js.map
# Try common API prefixes
for p in api v1 api/v1 internal admin; do
curl -o /dev/null -s -w "%{http_code} $p\n" \
https://target.com/$p/
done
# Copy any XHR from DevTools as cURL, then replay.
# Example: a typical authenticated API call
curl -X POST https://target.com/api/v1/orders \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"productId":123,"quantity":1}'
# Now test for broken access control:
# change the productId, or drop the auth header,
# or use a low-priv token
curl -X POST https://target.com/api/v1/orders \
-H "Authorization: Bearer $LOW_PRIV_TOKEN" \
-H "Content-Type: application/json" \
-d '{"productId":999,"quantity":1}'
# Also try:
# - remove Authorization entirely
# - send a token with alg: none
# - send a token for a different user
# - change the user id in the URL
Every API call is a test case.
Do not only test the UI.
SECTION 07Test yourself — React vs old tools quiz
Five questions. No sign-up.
0 / 5Pick an answer to see why it is right or wrong.
SECTION 08Frequently asked questions
Does React make a web app more secure?
Not on its own. React escapes values by default, which removes some reflected XSS, but it does not prevent SQL injection, IDOR, broken access control or XSS through dangerouslySetInnerHTML. The OWASP Top 10 categories remain exactly the same.
Do old tools like Burp Suite still work on React apps?
Yes. Burp, curl and Postman are still the core of any ethical hacker's toolkit. Every fetch() call in a React app is still an HTTP request, so intercepting and replaying works exactly as before — you just point it at API endpoints instead of HTML forms.
What is the biggest change for ethical hackers testing React apps?
The target moved. Instead of crawling pages and fuzzing forms, you now read the JavaScript bundle, capture API calls in DevTools, and replay requests in Postman or Burp. The attack surface is the API and the JS bundle, not the HTML page.
Are source maps a real vulnerability?
Often yes. If a .map file is publicly accessible, the original unminified source code of the app is exposed. This reveals internal API paths, variable names and sometimes sensitive logic. Most bug bounty programs accept exposed source maps as a low or medium severity finding.
Where does XSS still work in React apps?
XSS still works wherever the developer bypasses React's escaping — most commonly through dangerouslySetInnerHTML, markdown renderers with raw HTML enabled, javascript: URLs in href, and direct DOM writes through innerHTML. Search the JS bundle for these patterns.
How do I find hidden API endpoints in a React app?
Three ways: capture every fetch/XHR in DevTools Network, search the JS bundle for strings like "/api/", and try common API prefixes such as /api/v1 and /internal. The bundle often contains endpoints that the UI never exposes to normal users.
Is GraphQL harder to test than REST?
Different rather than harder. If introspection is enabled, you can dump the entire schema and then test each query and mutation for missing field-level authorization. Start with introspection and look for queries that return data the current user should not see.
What should I learn first as a beginner in web security?
Start with the OWASP Top 10, then learn Burp Suite and DevTools. After that, learn to read a JS bundle and capture API traffic. Those three skills — OWASP, Burp, bundle reading — cover most of what you need to start finding real bugs in React apps.
SECTION 09Related reads
Classroom & online · Delhi NCR
Learn to test modern web apps the right way
Our Ethical Hacking Training Course is built around the real target surface of 2026 — Burp Suite, API testing, JS bundle analysis, JWT testing, and modern React app testing with DevTools and Postman.
₹15,500 onwards- Burp Suite & DevTools
- API testing with Postman
- JS bundle & source map analysis
- Weekday & weekend batches