CWE-425: Direct Request ('Forced Browsing') (Base)

Description: The web application does not adequately enforce appropriate authorization on all restricted URLs, scripts, or files.

Extended Description: Web applications susceptible to direct request attacks often make the false assumption that such resources can only be reached through a given navigation path and so only apply authorization at certain points in the path.


Alternate Terms: ::TERM:forced browsing:DESCRIPTION:The forced browsing term could be misinterpreted to include weaknesses such as CSRF or XSS, so its use is discouraged.::

Applicable Platforms: ::LANGUAGE CLASS:Not Language-Specific:LANGUAGE PREVALENCE:Undetermined::TECHNOLOGY CLASS:Web Based:TECHNOLOGY PREVALENCE:Undetermined::

Modes of Introduction: ::PHASE:Implementation::PHASE:Operation::



Common Consequences: ::SCOPE:Confidentiality:SCOPE:Integrity:SCOPE:Availability:SCOPE:Access Control:IMPACT:Read Application Data:IMPACT:Modify Application Data:IMPACT:Execute Unauthorized Code or Commands:IMPACT:Gain Privileges or Assume Identity::


Potential Mitigations: ::PHASE:Architecture and Design Operation:DESCRIPTION:Apply appropriate access control authorizations for each access to all restricted URLs, scripts or files.::PHASE:Architecture and Design:DESCRIPTION:Consider using MVC based frameworks such as Struts.::

Observed Examples: ::REFERENCE:CVE-2022-29238:DESCRIPTION:Access-control setting in web-based document collaboration tool is not properly implemented by the code, which prevents listing hidden directories but does not prevent direct requests to files in those directories.:LINK:https://www.cve.org/CVERecord?id=CVE-2022-29238::REFERENCE:CVE-2022-23607:DESCRIPTION:Python-based HTTP library did not scope cookies to a particular domain such that supercookies could be sent to any domain on redirect.:LINK:https://www.cve.org/CVERecord?id=CVE-2022-23607::REFERENCE:CVE-2004-2144:DESCRIPTION:Bypass authentication via direct request.:LINK:https://www.cve.org/CVERecord?id=CVE-2004-2144::REFERENCE:CVE-2005-1892:DESCRIPTION:Infinite loop or infoleak triggered by direct requests.:LINK:https://www.cve.org/CVERecord?id=CVE-2005-1892::REFERENCE:CVE-2004-2257:DESCRIPTION:Bypass auth/auth via direct request.:LINK:https://www.cve.org/CVERecord?id=CVE-2004-2257::REFERENCE:CVE-2005-1688:DESCRIPTION:Direct request leads to infoleak by error.:LINK:https://www.cve.org/CVERecord?id=CVE-2005-1688::REFERENCE:CVE-2005-1697:DESCRIPTION:Direct request leads to infoleak by error.:LINK:https://www.cve.org/CVERecord?id=CVE-2005-1697::REFERENCE:CVE-2005-1698:DESCRIPTION:Direct request leads to infoleak by error.:LINK:https://www.cve.org/CVERecord?id=CVE-2005-1698::REFERENCE:CVE-2005-1685:DESCRIPTION:Authentication bypass via direct request.:LINK:https://www.cve.org/CVERecord?id=CVE-2005-1685::REFERENCE:CVE-2005-1827:DESCRIPTION:Authentication bypass via direct request.:LINK:https://www.cve.org/CVERecord?id=CVE-2005-1827::REFERENCE:CVE-2005-1654:DESCRIPTION:Authorization bypass using direct request.:LINK:https://www.cve.org/CVERecord?id=CVE-2005-1654::REFERENCE:CVE-2005-1668:DESCRIPTION:Access privileged functionality using direct request.:LINK:https://www.cve.org/CVERecord?id=CVE-2005-1668::REFERENCE:CVE-2002-1798:DESCRIPTION:Upload arbitrary files via direct request.:LINK:https://www.cve.org/CVERecord?id=CVE-2002-1798::



Notes: ::TYPE:Relationship:NOTE:Overlaps Modification of Assumed-Immutable Data (MAID), authorization errors, container errors; often primary to other weaknesses such as XSS and SQL injection.::TYPE:Theoretical:NOTE:Forced browsing is a step-based manipulation involving the omission of one or more steps, whose order is assumed to be immutable. The application does not verify that the first step was performed successfully before the second step. The consequence is typically authentication bypass or path disclosure, although it can be primary to all kinds of weaknesses, especially in languages such as PHP, which allow external modification of assumed-immutable variables.::