better-auth admin update-user phone takeover (CVE-2026-134311)

better-auth before 1.7.16 and 1.8.0-beta.5 has an incorrect authorization flaw in the admin plugin's /admin/update-user endpoint. A role with user:update can change another user's phoneNumber and phoneNumberVerified, allowing an attacker to set a verified phone number on a higher-privileged account and sign in via phone OTP to take it over.

Overview

CVE-2026-134311 affects better-auth versions: - 1.3.0 before 1.7.16 - 1.8.0-beta.0 before 1.8.0-beta.5

The vulnerability is in the admin plugin's /admin/update-user endpoint. The endpoint does not correctly enforce authorization for the phoneNumber and phoneNumberVerified fields. A user/role that has the user:update permission can modify these fields on another account, including a higher-privileged account. By setting their own verified phone number on the target account, the attacker can then sign in using phone OTP and effectively take over the account.

This is a privilege escalation / account takeover issue and should be treated as high severity.

Affected systems

- Node.js/JS applications using better-auth with the admin plugin enabled. - Versions: 1.3.0 up to but not including 1.7.16, and 1.8.0-beta.0 up to but not including 1.8.0-beta.5.

What to do

1. Upgrade better-auth to a fixed version: 1.7.16 or later, or 1.8.0-beta.5 or later for the 1.8 beta line. 2. If you cannot upgrade immediately, restrict access to the /admin/update-user endpoint and audit which roles actually hold the user:update permission. Remove it from roles that do not need it. 3. Review audit logs for unexpected changes to phoneNumber or phoneNumberVerified on privileged accounts, especially changes made via the admin plugin. 4. For privileged accounts, consider enforcing additional authentication factors that are not phone-OTP-only until the patch is applied. 5. Verify the vendor advisory before changing production: https://github.com/better-auth/better-auth/security/advisories/GHSA-g95c-wqvr-8c3j

References

- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-134311 - GitHub Security Advisory: https://github.com/better-auth/better-auth/security/advisories/GHSA-g95c-wqvr-8c3j - VulnCheck: https://www.vulncheck.com/advisories/better-auth-1.3.0-before-1.7.16-privilege-escalation-via-admin-update-user-phone-number

Sources