GHSL-2020-197: Open redirect vulnerability in Ghost
Ghost's private blogging middleware redirects to the path name of a URL from a query parameter, which can be manipulated to start with a double slash and cause an open redirect to an external site. An attacker could use this to phish users by sending a crafted link that appears to be to a Ghost blog article.
Originally disclosed on GitHub Security Lab
This line redirects to the path name of a redirect URL stored in a query parameter.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
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
The application used the path name of a user-controlled redirect URL without validating that it was a safe relative path, allowing a path starting with double slashes to be interpreted as an absolute URL.
Impact
An attacker could launch a phishing attack by sending a crafted link that appears to refer to a Ghost blog article, leading the victim to a login screen and then redirecting them to an attacker-controlled site.
What the attacker needed
Victim clicks a crafted link; Ghost blog with private blogging enabled
The fix
The fix was released in version 3.41.1 and backported to the 2.x branch (2.38.3).
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.
An open redirect is when a website takes a user-supplied address and sends the user there without checking it is safe. Here, Ghost took a redirect address from the URL and only used its path part, but if that path started with two slashes, the browser treated it as a full external address. This let an attacker craft a link that looked like it went to a Ghost blog but actually sent the victim to a malicious site after login.
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.