Forced browsing: a page nobody links to is still a page
Forced browsing is the attack of requesting a URL directly because it exists, not because the site links to it: an admin panel, an old backup, a configuration file, an unprotected folder. It works whenever the only thing standing between a visitor and a resource is that the address is hard to guess. The remedy is an access check on the server, not a better hiding place.
Quick facts
- Also called
- Forced browsing, direct request, predictable resource location, force browsing
- Weaknesses
- CWE-425 Direct Request, formerly titled Forced Browsing; CWE-548 Exposure of Information Through Directory Listing
- OWASP category
- A01:2025 Broken Access Control; the exposed-file side also touches A02:2025 Security Misconfiguration
- Target
- Resources the application does not reference but the server still serves
- Typical signal
- A run of 404 and 403 responses from one client, then a 200 on something nobody should reach
- Main fix
- Check authorization on every restricted URL on the server, keep files that are not meant to be public out of the web root, and turn directory listing off
Definitions follow OWASP Forced Browsing and the two CWE entries above. The guidance on administrative interfaces comes from the OWASP Web Security Testing Guide.
What forced browsing is
A site is a graph of links, but the server is not a graph. It is a function from a URL to a file or a response, and it answers any URL it is given. Pages that no menu, sitemap or page body mentions are still reachable if someone types the address.
OWASP describes forced browsing as an attempt to enumerate and access resources that the application does not reference but that remain reachable. The person doing it may be trying addresses by hand or letting a tool try many. The unlinked content OWASP names is temporary directories and files, old backups and configuration files, which can expose source code, credentials and internal network addressing.
CWE-425 states the flaw from the server's side: the application does not adequately enforce authorization on all restricted URLs, scripts or files. The attacker does not need a trick. The check was missing, and the address was all it took.
Why a hidden URL is not protected
Obscurity is a weak control because addresses leak through ordinary channels. They appear in browser history, in referrer headers, in emails and chat messages, in old pages that were cached or archived, in logs, and in the source of scripts the site itself serves. A path that was secret on the day it was created rarely stays that way.
It also fails for a simpler reason: addresses are guessable. People name things after what they are, and the same few conventions repeat from site to site. A scanner does not need to know your layout; it asks for the conventional names and watches which ones answer. That is the working method behind the vulnerability scanners that visit most public sites every day.
robots.txt is a map, not a lock
A common mistake is to list a sensitive folder in robots.txt to keep it out of search. RFC 9309 says plainly that these rules are not a form of access authorization, and that listing paths in the file exposes them publicly and makes them discoverable. Anyone can read the file, including people who are looking for exactly those paths. See the robots.txt guide for what the file is for. If something must stay out of search results and out of reach, it needs authentication, not a request to well-behaved crawlers.
Hiding with a status code is not access control either
Returning 404 instead of 403 for a restricted page is allowed: RFC 9110 lets a server that wants to hide the existence of a forbidden resource answer 404. That reduces what a visitor learns, but it is a courtesy layered on top of the check. If the check is missing, the page simply answers 200.
What tends to be exposed
The pattern is the same everywhere: something useful to the team ended up somewhere the server will hand out.
- Administrative interfaces. The OWASP testing guide notes that admin interfaces allow privileged users to change accounts, data, layout and configuration, and that they often lack sufficient access controls. Finding one is the first step; getting in depends on what protects it.
- Copies of files. An editor leaves a second copy beside the original, a developer renames a file before an upgrade, an archive of the whole site is made for a move. If the server serves the extension, the copy is public, and it may show source code the original would have run.
- Configuration and service files. Settings, environment files and version-control metadata can hold credentials and internal addresses.
- Logs, exports and test pages. Output that was meant for the team and was never moved out of the document root.
- Predictable object addresses. The OWASP page also gives the case of guessing a URL parameter to reach another user's data. That overlaps with IDOR: the request is valid, the missing check is on who is asking.
Directory listing
Directory listing is the feature that makes the rest of this page easier. When a request names a folder that has no index file and listing is on, the server builds a page that names everything inside. CWE-548 calls this inappropriate exposure of an index of all resources in the directory. The attacker no longer has to guess; the server supplies the names.
Listing is a configuration choice. In nginx the autoindex directive defaults to off, so a listing appears only if someone turned it on (nginx documentation). In Apache an index is generated only when Indexes is enabled through the Options directive (Apache documentation). Check the settings that are actually in force, including inherited ones and any panel or container image that ships its own. The wider habit of leaving defaults in place is covered under security misconfiguration.
Turning listing off removes the index, not the files. A file whose name is known is still served unless the server checks access to it.
How it looks in your logs
Forced browsing is noisy when it is done by trial. One client asks for many addresses in a short time, most of them nonexistent, and the log fills with 404 responses. Where some addresses exist but are restricted, 403 or 401 responses appear among them. The signal is the shape: many distinct paths, few repeats, one source, little interest in the pages your visitors actually read.
The dangerous line is the one that does not fit: a 200 on a path that should have been refused, or a 200 on a path that should not exist at all. A run of 404s is only background; the reply that came back different from its neighbours is the finding.
Two cautions. First, a site with no restricted pages produces noise like this from scanners all the time, and most of it is harmless. Second, a quiet log proves little: an attacker who already knows an address, from a leaked link or a former employee, sends one request and leaves one line. Spotting a pattern helps; it does not replace the check.
The 403 Forbidden page explains what the status does and does not tell a client, and the activity log shows the requests Bridge WAF flagged.
Where a WAF helps and where it does not
A web application firewall looks at requests. It can see that one client is asking for many paths that do not exist, and it can apply a rate limit to that client. It can refuse a request that matches a known category of probing. Those are useful against automated sweeps, which is where most forced browsing happens.
It cannot know which of your URLs should be private. Whether /reports/ is a public page or a staff-only export is a fact held by your application, and a filter that guesses will either block real visitors or miss the one request that matters. A single request for a known address that returns the right file looks, from the outside, exactly like a legitimate visit. This is the same limit described for broken access control and path traversal: a filter slows the search, the application closes the hole.
Bridge WAF has three modes. In off nothing is inspected. In monitor matching requests are recorded and every request is still served, so you can read the monitor-mode record and see which probes reach your site and what answered them. In block matching requests are refused and still recorded. Start with monitor, read what it flags, and only then switch to block. Per-domain rate limiting is the other tool in this area: it caps how fast one client can sweep, and it leaves the access decision where it belongs.
Rule matching and limits are the edge layer. Authorization on restricted pages, a document root with only public files in it, and directory listing turned off are the origin layer. Do both; only the second removes the exposure.
How to prevent it
- Enforce access on the server, for every request. Require authentication and an authorization check on each restricted URL, script and file, as CWE-425 describes, rather than relying on links not being shown.
- Deny by default. New routes should be closed until someone opens them. A route added in a hurry then fails safe.
- Keep non-public files out of the web root. Backups, exports, archives, settings and logs belong outside the folder the server publishes, or on storage that is not reachable by URL.
- Turn directory listing off and confirm it on the live configuration, not only in the template.
- Restrict administrative interfaces. Following the OWASP testing guide, limit them by network or other controls so they are not open to everyone, remove default credentials and configurations, and keep the administrator model separate from the ordinary user model.
- Clean up at deploy time. Make the release process remove stray copies, test pages and generated output, and keep a short list of what a release should contain.
- Look for it yourself. Review your own site the way OWASP describes: list what the server answers for and compare it with what you meant to publish.
Questions
What is forced browsing?
Forced browsing is an attack in which someone requests URLs that the application does not link to, such as admin pages, old backups or configuration files, and gets them because the server never checks who is asking.
Why does security through obscurity fail here?
An unlinked address is still served to anyone who requests it. Addresses leak through history, logs and shared links, and common names are easy to guess, so only an access check on the server keeps a resource private.
Is directory listing a vulnerability?
It is a weakness when it exposes an index of files that should not be public, listed as CWE-548. It is a server setting: turn it off, and also make sure the files themselves are not served without a check.
How do you detect forced browsing?
Look for one client requesting many different paths in a short time, mostly 404 and 403 responses. The finding that matters is a 200 on a path that should have been refused or should not exist.
Can a WAF stop forced browsing?
Only in part. A WAF can record or refuse automated probing and limit how fast one client sweeps. Deciding which URLs are private needs access control in the application, so use monitor mode first and fix the origin.