This vulnerability occurs when a web application uses the HTTP Referer header as a sole or primary method for authentication or authorization decisions. Since this header is entirely controlled by the user's browser or client and can be easily forged, it provides no reliable security.
The HTTP Referer header is designed to tell a server which page a user came from, but it was never intended for security. Treating it as a trusted credential is like using a 'recommended by a friend' note for building access—anyone can write it. Developers might implement this check to prevent cross-site request forgery (CSRF) or to restrict direct URL access, but because attackers can fully manipulate the header with simple tools like a proxy or browser extension, this defense is completely ineffective. To properly secure authentication and authorization, always use established server-side mechanisms like session tokens, CSRF tokens, or standard authentication protocols (OAuth, SAML). These methods rely on secrets or cryptographic signatures that the client cannot easily forge. Relying on the Referer header creates a false sense of security and leaves critical application functions exposed to trivial bypass attacks.
Impact: Gain Privileges or Assume Identity
Actions, which may not be authorized otherwise, can be carried out as if they were validated by the server referred to.
c++javaHigh