
Cloud Vulnerability DB
A community-led vulnerabilities database
In adopt mode the Better Auth engine writes the provider tables (sessions, verifications, accounts, API keys, organization members and invitations) through the host's Payload collections. When a host collection has versioning enabled, every write also stores a version copy of the row. Those copies include session tokens, verification identifiers (magic-link and password-reset tokens under Better Auth's default plain storage), API key hashes and metadata.
Payload's default for readVersions is Boolean(req.user). With admitAnonymous: true, a guest session counts as a user. So on a host whose adopted provider collections are versioned and declare no readVersions, any session can list those version copies through /api/<slug>/versions and GraphQL.
payload-auth-link already guards this for the users collection: collections.js fills readVersions with a role-manager check. It does not do the same for the other adopted provider collections, and the doctor does not warn about versioning on them.
Apps migrating from payload-auth inherit its collection overrides. A common shape is versions: { drafts: false }, written to satisfy the drizzle adapter's config.versions.drafts access. That shape keeps versioning on, because Payload treats any truthy versions value as enabled. We found exactly this in a production app migrated with the kit.
Any session, including a free guest session when admitAnonymous is on, could read live short-lived tokens and other auth material from the version tables. Depending on token storage, that can lead to account takeover. The live tables themselves were correctly admin-only; only their version copies leaked.
versions: false). These rows hold secrets and nothing needs their history. At minimum, fill readVersions with the same role-manager or deny-all check users gets, and deny readVersions on the kit's own records collection, which already does._*_v rows.versions: { drafts: false } trap explicitly.We defaulted readVersions to admin-only for every collection and versioned global, purged the stored auth version rows, then set versions: false on the auth collections (their _v tables are dropped in a following release).
Versions: plugin 0.18.2, provider-better-auth 0.14.2, migrate 0.14.1, Payload 3.91, Better Auth 1.7.10.
Source: NVD
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."