This vulnerability occurs when an application uses user-supplied input to reference a resource located outside its intended security boundary, allowing attackers to redirect operations to unintended locations.
This flaw typically happens when developers treat all resource identifiers (like filenames, URLs, or keys) as safe, even when they come from untrusted sources like user input, configuration files, or API responses. Attackers exploit this by injecting paths or references that "escape" the application's intended directory, server, or cloud environment—often using sequences like `../` to traverse directories or full URLs to external systems. The core issue is a failure to validate that a referenced resource actually resides within the allowed security sphere before accessing it. To prevent this, always validate and sanitize all resource references against an allow-list of permitted locations. Implement strict access controls and use mechanisms like chroot jails, container boundaries, or signed URLs to enforce isolation. Never rely solely on input filtering; instead, design your system to map user-provided identifiers to actual resources through an indirect reference map or lookup table that you fully control.
Impact: Read Application DataModify Application Data
An adversary could read or modify data, depending on how the resource is intended to be used.
Impact: Gain Privileges or Assume Identity
An adversary that can supply a reference to an unintended resource can potentially access a resource that they do not have privileges for, thus bypassing existing access control mechanisms.
javahtml