Skip to content

← Actionable
Medium, CVSS 6.1

PocketBase vulnerable to account pre-hijacking via OAuth2 unverfied->verified autolinking upgrade

CVE-2026-44166GHSA-pq7p-mc74-g65w

What to do

Vendor fix available. Upgrade each affected package to the fixed version on its release line (github.com/pocketbase/pocketbase 0.37.4, 0.22.42), redeploy, then verify what is actually installed.

This page has no inventory attached, so it cannot say whether you are affected. A vendor fix is not proof that your deployment is fixed.

Affected packages

Sources

Severity and exploitation
Exploitation
No confirmed exploitation recorded. Patch Next marks exploitation only from CISA KEV.
CVSS 4.0
6.1 · 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 · score source
EPSS
  • CVE-2026-44166: 0.25% estimated exploitation activity in the next 30 days; percentile 16.10 (FIRST EPSS, 2026-11-03). This is a model estimate, not proof of exploitation or customer exposure.
Source description

As published by the source; long descriptions are shortened.

A pre-hijacking issue was discovered with the OAuth2 autolinking by Alardiians. 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. The upgrade flow operates within the expectations but the problem is that I forgot to clear the previous OAuth2 link(s) leaving the attacker to still have access to the initially created user. Or in other words, the vulnerability is similar to the mixed password + OAuth2 auth pre-hijacking issue that we had in the past…

Dates and revisions
Published by the source
Last modified by the source
Source last checked
  1. Revision 1 · created ·

    Published from ghsa record GHSA-pq7p-mc74-g65w

Agent brief

Preview the exact text before you copy it. Commands are read-only suggestions; review them before running anything.

# Patch Next advisory brief: CVE-2026-44166

Advisory: PocketBase vulnerable to account pre-hijacking via OAuth2 unverfied->verified autolinking upgrade
IDs: CVE-2026-44166, GHSA-pq7p-mc74-g65w
Record: https://patchnext.com/advisories/cve-2026-44166 (revision 1, source checked 26 Oct 2026, 15:20 UTC)
Inventory: none attached. This brief comes from a public page and does not say whether any deployment is affected.
Severity: Medium (CVSS 6.1)
Exploitation: no confirmed exploitation recorded. Patch Next confirms exploitation only from CISA KEV.
Vendor response: Vendor fix available; fixed versions by package: github.com/pocketbase/pocketbase 0.37.4, 0.22.42. A vendor fix does not mean a deployment is fixed.

## Affected components
- Go github.com/pocketbase/pocketbase: affected < 0.22.42; >= 0.30.0, < 0.37.4; fixed in 0.37.4, 0.22.42

## Suggested inspection (read-only)
- Go github.com/pocketbase/pocketbase: check the installed version with your package manager.

## Supported action
Upgrade each affected component to a fixed version on its release line. For a transitive dependency, upgrade the parent package or add an override or constraint, then regenerate the lockfile. Redeploy every environment that ran an affected version.

## Required regression checks
- Run the test suite and a production build.
- Exercise the features that depend on github.com/pocketbase/pocketbase.
- Repeat the inspection and confirm that only fixed versions remain installed.

## Rollback considerations
- Keep the previous lockfile and deployment artifact. Rolling back reinstates the vulnerable version, so apply any documented mitigation while you fix forward.

## Unresolved questions
- Which deployments run an affected version?
- Exploitation status can change. Check again before lowering the priority.
- Mark the work resolved only after the fixed version is verified in production.

## Sources
- Verified: https://github.com/advisories/GHSA-pq7p-mc74-g65w (GitHub-reviewed advisory GHSA-pq7p-mc74-g65w lists affected ranges: Go github.com/pocketbase/pocketbase >=0 =0.30.0 <0.37.4)

Commands are suggestions: review each one before running it.

Loading voting…