79% vs 51%: independent neobanks lag on app security. Read the report

Deep Dive

Deep Dive

Pocket ID Email Verification Bypass, Fixed 2.12.0 (CVE-2026-115770)

Pocket ID before 2.12.0 keeps an email-verification token valid after the address changes, letting a user verify an address they do not control.

TL;DR

  • Pocket ID bound a verification token to the user, not the address. A user could get a token for their own address, switch to a victim's address, and redeem it to mark the new address verified.
  • Every release from 2.2.0 through 2.11.x is affected when email verification is enabled, which is the default.
  • The CVE record scores it CVSS v3.1 9.6 Critical. No exploitation in the wild is known, and it is not in CISA KEV as of 2026-11-20.
  • Upgrade to 2.12.0 or later, currently 2.19.3, and audit accounts whose verified address changed around the upgrade.

Am I affected?

All of these conditions must hold for a Pocket ID deployment to be exposed:

  • The version is 2.2.0 or later and earlier than 2.12.0.
  • Email verification is in use, which is the default (emailsVerified=false, so an address change resets the verified flag to false).
  • Users can edit their own account, which is the default (allowOwnAccountEdit=true).
  • The address an attacker wants to claim is not already assigned to another Pocket ID user.
  • A relying party links or provisions accounts from the OIDC email and email_verified claims. An application that uses only the stable sub claim is not affected by the downstream takeover.
Branch Affected versions Fixed version
Pocket ID 2.x 2.2.0 through 2.11.x 2.12.0

The fix shipped in 2.12.0 on 2026-07-29. The current release is 2.19.3, published on 2026-11-15. The official pocketid/pocket-id image had 951,341 Docker Hub pulls on 2026-11-20, and the repository had 10,399 stars.

Check the running version from inside the container or on the host:

# Official container image
docker exec <container> /app/pocket-id version

# Binary install
pocket-id version

# Kubernetes
kubectl exec deploy/pocket-id -- /app/pocket-id version

The output is pocket-id <version>. If the command is unavailable, read the image tag or the release name you deployed.

How do I fix it?

Upgrade to 2.12.0 or later and recreate the container. The upgrade does not retroactively unverify addresses that were already marked verified, so plan the audit in step 4.

  1. Pull the current release and recreate the container with the same volumes and environment:
docker pull pocketid/pocket-id:v2.19.3
docker compose pull pocket-id
docker compose up -d pocket-id
  1. For a binary install, replace the binary with the 2.19.3 release asset for your platform and restart the service. Keep the existing data directory and environment.
  2. For a source build, build and deploy tag v2.19.3 or later.
  3. Audit users whose email_verified value is true and whose address changed near the upgrade. Re-verify any account whose verification cannot be explained, and review relying-party links or provisioning that used the claimed address.

There is no configuration workaround that fixes the stale token. Disabling self-service email changes removes the step that makes the token useful, but it changes user management for the whole deployment and does not repair addresses already verified.

What is the root cause?

Pocket ID stored the verification token against the user ID only. Changing the account email reset the email_verified flag but did not delete or rebind outstanding tokens, and redeeming a token set email_verified on whichever address the account held at that moment.

The model at backend/internal/model/email_verification_token.go lines 5 to 13 in 2.11.0 has no address field:

type EmailVerificationToken struct {
    Base

    Token     string
    ExpiresAt datatype.DateTime

    UserID string
    User   User
}

SendEmailVerification() at backend/internal/service/user_service.go lines 599 to 633 creates the token with UserID, Token and ExpiresAt, then emails the link to the address on the account at that time:

emailVerificationToken := &model.EmailVerificationToken{
    UserID:    user.ID,
    Token:     randomToken,
    ExpiresAt: datatype.DateTime(expiration),
}

updateUserInternal() resets verification when the address changes, at lines 430 to 435:

if (user.Email == nil && updatedUser.Email != nil) || (user.Email != nil && updatedUser.Email != nil && *user.Email != *updatedUser.Email) {
    // Email has changed, reset email verification status
    user.EmailVerified = s.appConfigService.GetDbConfig().EmailsVerified.IsTrue()
}

user.Email = updatedUser.Email

That reset is the only link between the address change and verification. No code deletes the rows in email_verification_tokens for the user, so a token issued for the old address remains usable.

VerifyEmail() at lines 635 to 661 looks up the token by token value, user ID and expiry, then sets EmailVerified on the user record:

err := tx.WithContext(ctx).Where("token = ? AND user_id = ? AND expires_at > ?",
    token, userID, datatype.DateTime(time.Now())).First(&emailVerificationToken).Error

The lookup never compares the address the token was sent to with the address now on the account. The token proves control of the old address, but it sets the flag on the new one.

How is it exploited?

An attacker with an ordinary Pocket ID account requests a verification token for an address they control, changes the account to an address they do not control, and redeems the old token. Pocket ID then publishes the new address as verified.

The advisory gives these reproduction steps through the API:

  1. Sign in as an ordinary user whose current address the attacker controls, for example attacker@example.test.
  2. Call POST /api/users/me/send-email-verification.
  3. Read the token from the message delivered to attacker@example.test, but do not redeem it yet.
  4. Call PUT /api/users/me and change the account email to an address the attacker does not control, for example victim@example.test.
  5. Observe that the new address is stored with emailVerified: false.
  6. Call POST /api/users/me/verify-email with the token delivered to attacker@example.test.
  7. Call GET /api/users/me. The address is now victim@example.test and emailVerified is true.
  8. Complete an OIDC flow with the email scope. Pocket ID emits:
{
  "email": "victim@example.test",
  "email_verified": true
}

No administrator privilege, victim interaction or access to the victim's mailbox is required. The only limit is that the target address must not already belong to another Pocket ID user.

How does the attack flow?

An attacker turns a token for their own address into a verified claim for someone else's address, because the token check never compares the two addresses.

flowchart LR A["Ordinary Pocket ID account
attacker@example.test"] --> B["Request verification token
sent to attacker address"] B --> C["Change account email
to victim@example.test"] C --> D["Redeem token issued
for the old address"] D --> E{"Token bound
to address?"} E -->|"No, user ID only"| F["email_verified = true
on victim address"] F --> G["OIDC claim links attacker
to victim account"]

What can an attacker do?

An attacker can make Pocket ID assert that they control an address they do not own. The impact appears at every relying party that trusts the verified email claim.

  • Account takeover at a relying party that links an existing account by email. The attacker's Pocket ID identity is attached to the victim's local account.
  • Unauthorized provisioning at a service that creates accounts from email and email_verified, with the victim's address and the attacker's identity.
  • Password-reset or invitation flows that trust the identity provider's verified email can be redirected to the attacker's session.

The impact needs the downstream application to trust the verified email claim for linking or provisioning. An application that keys accounts only on the OIDC sub claim is not taken over by this flaw, because the sub value does not change.

Why does the fix work?

The fix binds the token to the address it was issued for and checks that address again when the token is redeemed. A token issued for the old address no longer verifies the new one.

emailverification/service.go in 2.12.0 stores the address and a hash of the token in the user's actor state:

state := State{
    TokenHash: utils.CreateSha256Hash(token),
    Email:     *user.Email,
    ExpiresAt: time.Now().Add(tokenLifetime),
}

Verify() updates the user only when both the user ID and the current address match the state stored with the token:

update := s.db.
    WithContext(ctx).
    Model(&model.User{}).
    Where("id = ? AND email = ?", userID, result.State.Email).
    Updates(map[string]any{
        "email_verified": true,
        "updated_at":     new(datatype.DateTime(time.Now())),
    })

if update.RowsAffected != 1 {
    return &common.InvalidEmailVerificationTokenError{}
}

If the account address changed after the token was issued, email no longer matches and the update affects zero rows. Pocket ID returns an invalid-token error and leaves email_verified false. The token is stored as a SHA-256 hash rather than plaintext, so a database read does not expose a usable token.

The fix is complete for the verification path. Existing accounts that were already marked verified before the upgrade are not changed, which is why the audit in "How do I fix it?" matters.

How do I check if I was compromised?

Pocket ID publishes no indicators of compromise for this flaw, and no exploitation in the wild is known.

Check the account audit trail and the relying parties that trust your Pocket ID claims:

  • In the Pocket ID admin audit log, look for an account that changed its email and then verified within the 24-hour token lifetime.
  • In relying-party logs, look for a new link or provisioning event for an existing account around the same time.
  • Review accounts whose email_verified value is true but whose address was changed after the token was issued.
  • Ask relying parties whether they link accounts by verified email. A party that uses only sub does not create the takeover path.

A verification event alone is normal. The signal is a verification that immediately follows an address change, especially when the new address belongs to an existing user at a downstream service.

Timeline

  • 2026-07-27: commit 43aaccd5 replaces the token model with a per-user actor that stores the token hash and the address.
  • 2026-07-29: Pocket ID 2.12.0 is released with the fix.
  • 2026-11-04: CVE-2026-115770 is published.
  • 2026-11-09: the GitHub advisory GHSA-rm8c-2cv8-jwf6 is published with reproduction steps.
  • 2026-11-15: Pocket ID 2.19.3, the current release, is published.

Timeline of CVE-2026-115770: the July 2026 fix commit and 2.12.0 release, then the November 2026 CVE and advisory
Figure 1: The 2.12.0 fix shipped on 2026-07-29, 98 days before the CVE was published. Source: Pocket ID repository and GitHub advisory, checked November 20, 2026.

FAQ

Does an attacker need an account on my Pocket ID instance?

Yes. The attacker needs an ordinary user account that can change its own email and request verification. No administrator role is required.

Are all Pocket ID deployments affected?

No. The deployment must run 2.2.0 through 2.11.x with email verification enabled and self-service account editing allowed. Both are defaults, so an unmodified deployment in that range is exposed.

Is there a public proof of concept?

Yes. The advisory publishes the API reproduction steps and an executable Go regression test. The test demonstrates the state transition without a working exploit against a third party.

Was the flaw exploited in the wild?

No exploitation is known. The CVE record and the advisory do not report attacks, and the CVE is not in CISA KEV as of 2026-11-20.

Does upgrading undo a fraudulent verification?

No. The upgrade prevents new mismatched verifications. An address already marked verified stays verified, so audit accounts verified before the upgrade and re-verify any that cannot be explained.

Does this affect OIDC clients that use the sub claim?

No. A client that identifies users only by the stable sub claim is not taken over by this flaw. The impact is at clients that link or provision accounts from email and email_verified.

Find exposed Pocket ID deployments with Ostorlab

Ostorlab's Web Agentic Deep Scan maps a web application's exposed routes and authentication surfaces. Use it to inventory the OIDC endpoints and account-management pages in front of your identity provider; detection of this CVE is not confirmed.

References

  • GitHub Advisory Database, GHSA-rm8c-2cv8-jwf6, "Pocket ID: Email verification token remains valid after address change": https://github.com/pocket-id/pocket-id/security/advisories/GHSA-rm8c-2cv8-jwf6 (checked November 20, 2026)
  • CVE Program, CVE-2026-115770: https://www.cve.org/CVERecord?id=CVE-2026-115770 (checked November 20, 2026)
  • Pocket ID, fix commit 43aaccd5bfacb76283b11ce039fb3f0716196fcb: https://github.com/pocket-id/pocket-id/commit/43aaccd5bfacb76283b11ce039fb3f0716196fcb (checked November 20, 2026)
  • Pocket ID, release v2.12.0: https://github.com/pocket-id/pocket-id/releases/tag/v2.12.0 (checked November 20, 2026)
  • Pocket ID, release v2.19.3: https://github.com/pocket-id/pocket-id/releases/tag/v2.19.3 (checked November 20, 2026)
  • Pocket ID, vulnerable source at v2.11.0, user_service.go: https://github.com/pocket-id/pocket-id/blob/v2.11.0/backend/internal/service/user_service.go (checked November 20, 2026)
  • Pocket ID, vulnerable token model at v2.11.0: https://github.com/pocket-id/pocket-id/blob/v2.11.0/backend/internal/model/email_verification_token.go (checked November 20, 2026)
  • Pocket ID, fixed verification service at v2.12.0: https://github.com/pocket-id/pocket-id/blob/v2.12.0/backend/internal/emailverification/service.go (checked November 20, 2026)
  • Pocket ID repository: https://github.com/pocket-id/pocket-id (checked November 20, 2026)
  • Docker Hub, pocketid/pocket-id: https://hub.docker.com/r/pocketid/pocket-id (checked November 20, 2026)
  • CISA Known Exploited Vulnerabilities catalog: https://www.cisa.gov/known-exploited-vulnerabilities-catalog (checked November 20, 2026)