{"id":"CVE-2026-44166","aliases":["CVE-2026-44166","GHSA-pq7p-mc74-g65w","GO-2026-5548"],"related":[],"kind":"vulnerability","state":"published","title":"Pocketbase: Account pre-hijacking via OAuth2 unverfied->verified autolinking upgrade","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"A pre-hijacking issue was discovered with the OAuth2 autolinking by [Alardiians](https://github.com/Alardiians).\n\nIn 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.\n\nThe 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.\n\nOr in other words, the vulnerability is similar to the [mixed password + OAuth2 auth pre-hijacking issue](https://github.com/pocketbase/pocketbase/security/advisories/GHSA-m93w-4fxv-r35v) that we had in the past but with a slightly different angle.\n\nSo 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.\n\n**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)_.**","format":"markdown","source":"ghsa"},{"lang":"en","text":"PocketBase: Account pre-hijacking via OAuth2 autolinking upgrade in github.com/pocketbase/pocketbase","format":"markdown","source":"go"},{"lang":"es","text":"Pocketbase es un backend web de código abierto escrito en go. Anteriormente a las versiones 0.22.42 y 0.37.4, en algunas situaciones, si un atacante conoce la dirección de correo electrónico de la víctima, puede crear y vincular un usuario de PocketBase no verificado con antelación autenticándose con uno de los proveedores de aplicaciones OAuth2, por ejemplo, ’A’. Cuando la víctima es invitada o decide registrarse en su aplicación por su cuenta con el proveedor ’B’ (la autenticación OAuth2 de PocketBase requiere que sea con un proveedor diferente porque no permitimos que múltiples cuentas OAuth2 del mismo proveedor se asocien a un único usuario de PocketBase), el usuario creado previamente por el atacante se vinculará automáticamente, se actualizará a ’verificado’ y su antigua contraseña se restablecerá. Esta vulnerabilidad está corregida en las versiones 0.22.42 y 0.37.4.","source":"nvd"}],"published":"2026-05-05T21:17:19.000Z","modified":"2026-11-11T20:10:00.273Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","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","score":6.1,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","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","score":6.1,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:4.0","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","rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:H/A:L","score":7.6,"rating":"HIGH"}],"cwes":["CWE-287"],"affected":[{"ranges":[{"version":"< 0.22.42","status":"affected"},{"version":">= 0.30.0, < 0.37.4","status":"affected"}],"vendor":"pocketbase","product":"pocketbase","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.22.42"}],"ecosystem":"Go","package":"github.com/pocketbase/pocketbase","purl":"pkg:golang/github.com/pocketbase/pocketbase","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0.30.0","status":"affected","fixed":"0.37.4"}],"ecosystem":"Go","package":"github.com/pocketbase/pocketbase","purl":"pkg:golang/github.com/pocketbase/pocketbase","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.22.42"},{"type":"semver","introduced":"0.30.0","status":"affected","fixed":"0.37.4"}],"ecosystem":"Go","package":"github.com/pocketbase/pocketbase","purl":"pkg:golang/github.com/pocketbase/pocketbase","source":"go"},{"ranges":[{"status":"affected","fixed":"0.22.42"},{"status":"affected","introduced":"0.23.0","fixed":"0.37.4"}],"vendor":"pocketbase","product":"pocketbase","cpe":"cpe:2.3:a:pocketbase:pocketbase:*:*:*:*:*:go:*:*","source":"nvd"}],"references":[{"url":"https://github.com/pocketbase/pocketbase/security/advisories/GHSA-pq7p-mc74-g65w","tags":["advisory","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-44166","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/pocketbase/pocketbase","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/pocketbase/pocketbase/commit/44bf55097af90c4c9dc240a8ea0d81923763a60e","tags":["fix"],"sources":["go"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-05-12T18:46:42.906Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-44166","url":"https://www.cve.org/CVERecord?id=CVE-2026-44166","licence":"CVE Terms of Use","modified":"2026-05-12T18:50:17.712Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-pq7p-mc74-g65w","url":"https://github.com/advisories/GHSA-pq7p-mc74-g65w","licence":"CC-BY-4.0","modified":"2026-07-24T19:11:28.110Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2026-5548","url":"https://pkg.go.dev/vuln/GO-2026-5548","licence":"CC-BY-4.0","modified":"2026-07-24T19:00:24.118Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-44166","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-44166","licence":"Public domain","modified":"2026-11-11T20:10:00.273Z"}],"updatedAt":"2026-11-25T22:59:21.453Z","epss":{"score":0.00247,"percentile":0.17119,"date":"2026-12-02T12:00:21.000Z"}}