# GHSA-65p7-pjj8-ggmr: Member account takeover

> Unauthenticated attackers can take over member accounts by changing their email addresses via a vulnerable API endpoint in Ghost.

- **Severity:** Not scored
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 23 Sep 2021

## What is GHSA-65p7-pjj8-ggmr?

GHSA-65p7-pjj8-ggmr is an authentication bypass vulnerability in ghost, published on 23 Sep 2021. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

### Impact

An error in the implementation of the member email change functionality allows unauthenticated users to change the email address of arbitrary member accounts to one they control by crafting a request to the relevant API endpoint, and validating the new address via magic link sent to the new email address.

Ghost(Pro) has already been patched. Self-hosters are impacted if running Ghost a version between 3.18.0 and 4.15.0 with members functionality enabled.

### Patches

Fixed in 4.15.1, all 4.x sites should upgrade as soon as possible.
Fixed in 3.42.6, all 3.x sites should upgrade as soon as possible.

### Workarounds

The patch in 4.15.1 and 3.42.6 adds a new authenticated endpoint for updating member email addresses. Updating Ghost is the quickest complete solution.

As a workaround, if for any reason you cannot update your Ghost instance, you can block the `POST /members/api/send-magic-link/` endpoint, which will also disable member login and signup for your site.

### For more information

If you have any questions or comments about this advisory:
* Email us at [security@ghost.org](mailto:security@ghost.org)

## Which versions are affected by GHSA-65p7-pjj8-ggmr?

4 open source packages ship an affected version, including ghost.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `ghost` | npm | From 3.18.0 | 3.42.6 |
| `ghost` | npm | From 3.18.0 | 3.42.6 |
| `ghost` | npm | From 4.0.0 | 4.15.1 |
| `ghost` | npm | From 4.0.0 | 4.15.1 |

## How do I fix GHSA-65p7-pjj8-ggmr?

Upgrade ghost to a fixed version for your release line: 3.42.6 or 4.15.1.

## Is GHSA-65p7-pjj8-ggmr being exploited?

There is no known exploitation of GHSA-65p7-pjj8-ggmr in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-65p7-pjj8-ggmr and fix it if it is affected.

What it is: GHSA-65p7-pjj8-ggmr is an authentication bypass vulnerability in ghost, published on 23 Sep 2021. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of GHSA-65p7-pjj8-ggmr in the wild and no public exploit code.

Affected packages and fixed versions:
- ghost (npm): affected from 3.18.0; fixed in 3.42.6
- ghost (npm): affected from 3.18.0; fixed in 3.42.6
- ghost (npm): affected from 4.0.0; fixed in 4.15.1
- ghost (npm): affected from 4.0.0; fixed in 4.15.1

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/GHSA-65p7-pjj8-ggmr/ (Markdown: https://insights.sbomify.com/GHSA-65p7-pjj8-ggmr/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-65p7-pjj8-ggmr

---
From sbomify Insights: https://insights.sbomify.com/GHSA-65p7-pjj8-ggmr/
Summaries are generated and may contain mistakes; the official description above is the record.
