WordPress Failure Notice page will generate arbitrary hyperlinks
The WordPress Failure Notice page uses the _wp_http_referer parameter to set the 'Please try again.' link, allowing an attacker to supply an arbitrary URL. An attacker could craft a link that shows a trusted-domain error page with a link to a malicious site.
Originally disclosed on HackerOne
- Triaged in 7 days
- Fixed in 28 days
- Paid in 29 days
- Disclosed after 59 days
Description:
When the "WordPress Failure Notice" page is returned, if the parameter _wp_http_referer was supplied with a valid URL, this URL will be used as the "Please try again." link (see attachment). A way to reliably generate this page, is to append ?wpcspReceiveCSPviol=1&_wp_http_referer=example.com to any page address.
Impact:
An obvious situation where this could lead to a problem, is if a malicious party is able to force the WordPress Failure Notice page with a parameter pointing to a site he controls. The unsuspecting user would be presented with a seemingly harmless page from a trusted domain, with an innocent looking "Please try again." link, which points to an attacker controlled location.
The severity of this issue is arguably small, however. It would involve some considerable amount of work on the attackers part, to create a situation where this could become a problem. As far as I could tell, the only way to reliably force the "WordPress Failure Notice" page, is to append ?wpcspReceiveCSPviol=1 to an URL.
Fix:
A fix would be to check that supplied arguments to the _wp_http_referer parameter, is restricted to the same domain as the page or to ensure that users aren't able to force Failure pages.
Attachments

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the application fails to validate that the _wp_http_referer parameter contains a URL from the same domain before using it as a link target.
Impact
An attacker could trick a user into visiting a malicious site via a link on a trusted error page, though the report notes the severity is small and requires considerable effort.
What the attacker needed
Victim clicks a crafted link
The fix
The fix should restrict the _wp_http_referer parameter to the same domain or prevent users from forcing failure pages.
How it was found
- Append the parameter wpcspReceiveCSPviol=1 and _wp_http_referer with a chosen URL to any page address.
- The WordPress Failure Notice page is displayed.
- The 'Please try again.' link points to the supplied URL.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
When a website shows an error page, it sometimes includes a link to try again. This report found that the link's destination could be controlled by anyone who adds a special parameter to the page address. So a user could see a real error page from a trusted site but the 'try again' link would take them to a different, possibly harmful, site.
What is Open redirect?
A trusted site forwards users to any address an attacker picks; rarely paid alone, often the missing link in a chain.