GHSA-jf75-q64q-g65r - Waline login accepts a non-string email as a match-all MongoDB query
## Summary
The login endpoint POST /api/token reads the `email` field from the request body without checking its type and passes it straight into the MongoDB storage query. When `email` is not a string (for example a JSON object such as {"$ne": null}), the MongoDB storage adapter's parseWhere silently DROPS the field rather than rejecting the request, producing an empty filter that matches ALL users. The endpoint then verifies the submitted password against the FIRST user returned (user[0]), which in Waline is the first-registered user โ the site administrator.
This is a PARTIAL authentication bypass, not a full one. The attacker still needs a valid password for that first user; this is not a zero-knowledge bypass and it does not disclose passwords. Its concrete effects are: (1) the email/identifier factor is removed for the administrator account, (2) user enumeration (a non-string email never fails the "no such user" branch), and (3) credential-stuffing amplification โ an attacker can test a leaked or weak password against the administrator account without knowing the administrator's email.
## Details
Untyped input โ packages/server/src/controller/token.js:17-18:
```
const { email, password, code } = this.post();
const user = await this.modelInstance.select({ email });
````
`email` comes from the request body with no type check.
The storage adapter silently drops a non-string key โ packages/server/src/service/storage/mongodb.js, parseWhere():
```
if (think.isString(where[k])) { filter[parseKey(k)] = { $eq: ... }; continue; } // intended guard
if (where[k] === undefined) { ... }
if (Array.isArray(where[k]) && where[k][0]) { ... operator handling (IN/LIKE/!=/> ...) }
```
A plain object such as {"$ne": null} is neither a string, undefined, nor an array, so NONE of the branches run and nothing is added to `filter` for `email`. The result is filter = {} -> instance.where({}) -> MongoDB find({}) returns every user. (The array form, e.g. ["!=",
MEDIUM
Severity & confidence
Source severitymedium
Platform severitymedium
Confidencemedium
Exploitationunknown
CVSS6.5
Affected
Vendors@waline
Products@waline/vercel
Reporting sources (1)
GitHub Security Advisories
Timeline & provenance
Published2026-10-28T21:17:58
Last updated2026-10-30T22:59:15
Ingested2026-10-28T21:27:22
FreshnessNEAR-REAL-TIME
Threat typeadvisory
Recommended action
Review the advisory and upgrade affected packages to the first patched version.
Next steps
- Identify affected systems in your environment.
- Apply the vendor patch or mitigation guidance.
- Review logs for indicators described in the advisory.
- Follow the affected vendor/product to track updates.
Confidence explanation
Reported by a single or secondary source; treat as indicative, verify before acting.
Source type: vendor ยท Original: GitHub Security Advisories