Referrer-Policy Header Missing

No Referrer-Policy header is set, so how much of a page's address is sent to other sites in the Referer header depends on each browser's default.

SeverityInformational
CVSS 3.10 CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:N/A:N Open in the calculator
CVSS 4.00 CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:N/VI:N/VA:N/SC:N/SI:N/SA:N Open in the calculator
CWECWE-201: Insertion of Sensitive Information Into Sent Data
OWASP Top 10A01:2025 Broken Access Control
CategorySecurity Misconfiguration

Description

When a user follows a link or a page loads a resource, the browser sends the address of the current page in the Referer request header. The Referrer-Policy response header controls how much of that address is sent, and to which destinations. The application does not set it, so each browser's default applies.

Current versions of the major browsers default to strict-origin-when-cross-origin: the full address is sent only with same-origin requests, other sites receive only the origin (scheme, host and port), and nothing is sent from an HTTPS page to an HTTP address, so in those browsers the missing header has no direct impact. Older browsers defaulted to no-referrer-when-downgrade, which sends the full address, including its path and query string, to any HTTPS destination.

In older browsers, and wherever a page or element sets a more permissive policy such as unsafe-url, the full address of a page is sent to third-party sites it links to or loads resources from, such as analytics, advertising or content delivery providers. Where those addresses carry sensitive values, such as tokens, identifiers, search terms, personal data or internal paths, the values are disclosed to the third party and kept in its logs. A missing header therefore mainly affects users of older browsers and pages whose addresses carry such values.

The issue is identified by inspecting response headers, together with any meta elements and referrerpolicy attributes in the pages, which can also set or weaken the policy.

Remediation

Set an explicit policy on every response so that behaviour does not depend on the browser. strict-origin-when-cross-origin suits most sites, while no-referrer or same-origin suits applications whose addresses carry sensitive values.

nginx: add_header Referrer-Policy "strict-origin-when-cross-origin" always; Apache (mod_headers): Header always set Referrer-Policy "strict-origin-when-cross-origin" IIS (web.config, within system.webServer): <httpProtocol> <customHeaders> <add name="Referrer-Policy" value="strict-origin-when-cross-origin" /> </customHeaders> </httpProtocol>

Review the pages for meta elements and referrerpolicy attributes that set unsafe-url or no-referrer-when-downgrade, and keep sensitive values out of addresses altogether rather than relying on the policy alone. Confirm the fix by checking that the header is present on HTML responses and, in the browser's developer tools, that requests to other sites carry only the origin.

References


Add This Finding to Your Library

In Pental this write-up is in Settings, Library. Add to my library copies it into your own, rated in your firm's CVSS version, ready to put in your own words.

Free trial  ·  No card required

Only need the reporting? Our reporting tool is free and open source, with the same library.


More Web Applications Findings

Every Web Applications finding