CVE-2024-38351
Password auth and OAuth2 unverified email linking
Also known as GHSA-m93w-4fxv-r35v, GO-2024-2936
Mitigation
- Upgrade github.com/pocketbase/pocketbase to 0.22.14 or later.
Who should check
- Projects that depend on Go package github.com/pocketbase/pocketbase (< 0.22.14)
- Anyone running pocketbase < 0.22.14
Vulnerability facts
- Affected
- github.com/pocketbase/pocketbase < 0.22.14
- Fixed in
- 0.22.14
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Remote, no login needed
- CVSS
- 5.4 (v3.1, CNA)CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:NOpen in CVSS calculator
Show all 8 CVSS metrics
- Attack vector: Network
- Attack complexity: Low
- Privileges required: None
- User interaction: Required
- Scope: Unchanged
- Confidentiality impact: Low
- Integrity impact: Low
- Availability impact: None
- EPSS
- 0.55% chance of exploitation in 30 days (percentile 40, 2026-11-26)
- CWE
- CWE-287
- Modified
Description
Pocketbase is an open source web backend written in go. In affected versions a malicious user may be able to compromise other user accounts. In order to be exploited users must have both OAuth2 and Password auth methods enabled. A possible attack scenario could be: 1. a malicious actor register with the targeted user's email (it is unverified), 2. at some later point in time the targeted user stumble on your app and decides to sign-up with OAuth2 (_this step could be also initiated by the attacker by sending an invite email to the targeted user_), 3. on successful OAuth2 auth we search for an existing PocketBase user matching with the OAuth2 user's email and associate them, 4. because we haven't changed the password of the existing PocketBase user during the linking, the malicious actor has access to the targeted user account and will be able to login with the initially created email/password. To prevent this for happening we now reset the password for this specific case if the previously created user wasn't verified (an exception to this is if the linking is explicit/manual, aka. when you send `Authorization:TOKEN` with the OAuth2 auth call). Additionally to warn existing users we now send an email alert in case the user has logged in with password but has at least one OAuth2 account linked. The flow will be further improved with ongoing refactoring and we will start sending emails for "unrecognized device" logins (OTP and MFA is already implemented and will be available with the next v0.23.0 release in the near future). For the time being users are advised to update to version 0.22.14. There are no known workarounds for this vulnerability.
Affected and fixed versions
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| Go github.com/pocketbase/pocketbase | < 0.22.14 | 0.22.14 | osv |
| pocketbase | < 0.22.14 | — | cvelist |
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2024-38351. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2024-38351.md Affected: github.com/pocketbase/pocketbase < 0.22.14 Fixed in: 0.22.14 Steps: 1. Search this machine and project for github.com/pocketbase/pocketbase (Go), pocketbase: dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
References
Vendor advisories
FAQ
Is CVE-2024-38351 being exploited?
There is no confirmed exploitation: CVE-2024-38351 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.55% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2024-38351?
Medium: CVSS 5.4 (v3.1, scored by CNA). Remote, no login needed. A user has to take an action, such as opening a link, for the attack to work.
Which versions are affected by CVE-2024-38351?
github.com/pocketbase/pocketbase < 0.22.14.
Is there a fix for CVE-2024-38351?
Yes. Fixed in 0.22.14. Upgrade github.com/pocketbase/pocketbase to 0.22.14 or later.
How do I check if I'm affected by CVE-2024-38351?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.