CVE-2026-44166

CVE-2026-44166 is a medium-severity improper authentication vulnerability in github.com/pocketbase/pocketbase (go), affecting versions < 0.22.42. It is fixed in 0.22.42, 0.37.4.

Does this CVE actually affect you?

Kodem shows which CVEs are reachable and running in your applications, so you fix what's exploitable, not just what's listed.

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

Runtime intelligence, not another scanner.

Summary

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

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 but with a slightly different angle.

So with that in mind, and to avoid introducing breaking changes to the auth flows, a new fix was applied that automatically deletes all such pre-existing OAuth2 links on "unverified" to "verified" upgrades.

While the vulnerability requires some prerequisites, it is considered severe and it is strongly recommended to upgrade to v0.37.4 (or to v0.22.42 if you are using an older <v0.23.0 release).

Impact

The application does not adequately verify the identity of a user, device, or process before granting access. Typical impact: unauthorized access to functions or data reserved for authenticated parties.

Affected versions

github.com/pocketbase/pocketbase (< 0.22.42) github.com/pocketbase/pocketbase (>= 0.30.0, < 0.37.4)

Security releases

github.com/pocketbase/pocketbase → 0.22.42 (go) github.com/pocketbase/pocketbase → 0.37.4 (go)

Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.

Already deployed Kodem?

See it in your environmentNew to Kodem? Get a demo →

Remediation advice

Upgrade the following packages to resolve this vulnerability:

github.com/pocketbase/pocketbase to 0.22.42 or later; github.com/pocketbase/pocketbase to 0.37.4 or later

Kodem Kai can prioritize this vulnerability in your dependency tree and generate a fix recommendation.

Frequently Asked Questions

  1. What is CVE-2026-44166? CVE-2026-44166 is a medium-severity improper authentication vulnerability in github.com/pocketbase/pocketbase (go), affecting versions < 0.22.42. It is fixed in 0.22.42, 0.37.4. The application does not adequately verify the identity of a user, device, or process before granting access.
  2. Which versions of github.com/pocketbase/pocketbase are affected by CVE-2026-44166? github.com/pocketbase/pocketbase (go) versions < 0.22.42 is affected.
  3. Is there a fix for CVE-2026-44166? Yes. CVE-2026-44166 is fixed in 0.22.42, 0.37.4. Upgrade to this version or later.
  4. Is CVE-2026-44166 exploitable, and should I be worried? Whether CVE-2026-44166 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
  5. What actually determines whether CVE-2026-44166 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
  6. How do I fix CVE-2026-44166?
    • Upgrade github.com/pocketbase/pocketbase to 0.22.42 or later
    • Upgrade github.com/pocketbase/pocketbase to 0.37.4 or later

Other vulnerabilities in github.com/pocketbase/pocketbase

Stop the waste.
Protect your environment with Kodem.