Medium · 6.5 Node.js & npm GHSA-jf75-q64q-g65r
Waline Login Flaw Lets Attackers Bypass Email Check and Target the Administrator Account
A flaw in Waline's login endpoint (GHSA-jf75-q64q-g65r) lets an attacker submit a non-string email value that causes the MongoDB query to match every user, exposing the administrator account to password-only login attempts. Fixed in @waline/vercel 1.41.0.
By PatchBriefing ·
Produced automatically from official sources with the help of AI. How we work →
AI summary
A vulnerability has been disclosed in Waline, a commenting system, affecting the @waline/vercel package. The issue (GHSA-jf75-q64q-g65r) involves the login endpoint's handling of the email field, which can be manipulated to bypass the email/identifier check and target the first-registered user account, typically the site administrator. The vendor has released a fixed version.
What Happened
A vulnerability was identified in the login endpoint (POST /api/token) of Waline's @waline/vercel package. The endpoint reads the 'email' field from the request body without verifying it is a string. When a non-string value is submitted (for example a JSON object), the underlying MongoDB query logic drops the field entirely instead of rejecting the request, resulting in a filter that matches every user in the database. The endpoint then checks the submitted password against the first user returned by that query, which in Waline corresponds to the first-registered account — the site administrator.
Technical Cause
The root cause is a missing type check on user input combined with a storage adapter that silently ignores unexpected input types rather than rejecting them. The MongoDB storage adapter's query-building function only handles string, undefined, or array values for the email field; a plain object value matches none of these cases, so no filter condition is added for 'email'. This produces an empty filter equivalent to 'match all records'. No upstream validation exists to catch this before the query is executed; the only pre-check performed is a captcha verification, with no check that email or password are strings.
Why It Matters
This is described in the advisory as a partial authentication bypass, not a complete one: an attacker still needs a valid password for the targeted account. However, the flaw removes the need to know the administrator's email address, meaning any leaked or weak administrator password can be tested directly. It also allows an attacker to confirm whether user accounts exist (user enumeration), since a non-string email never triggers the normal 'no such user' response. If an attacker happens to possess a valid password for the administrator account — for example through credential reuse or a data breach elsewhere — this flaw could lead to administrator-level login.
Who Is Affected
Deployments of the @waline/vercel package at version 1.40.3 or earlier are affected. Any installation exposing the /api/token login endpoint to unauthenticated requests is potentially impacted, since no authentication is required to send the crafted request.
Affected Versions
@waline/vercel versions from 0 up to and including 1.40.3 are affected. Version 1.41.0 contains the fix.
Fixes and Mitigation
The vendor has released @waline/vercel version 1.41.0, which addresses this issue. The recommended fix validates that the email and password fields submitted to the login endpoint are strings before they are used in the database query, and as defense in depth, the storage query logic should reject (rather than silently drop) values that are neither strings nor a supported array form.
Recommended Action
Site owners running @waline/vercel should upgrade to version 1.41.0 as soon as possible. Until the upgrade is applied, consider restricting or monitoring access to the /api/token endpoint and ensure administrator accounts use strong, unique passwords not reused from other services, since the flaw amplifies the impact of password reuse and weak credentials.
PatchBriefing score
6.5 / 10 · Medium
Official CVSS: 6.5
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N
Why this score
The PatchBriefing score equals the official CVSS score; when this article covers several vulnerabilities, the highest one. Signals such as known exploitation and EPSS are listed separately and do not change the score.
Affected versions
- @waline/vercel <= 1.40.3
- vulnerable
- @waline/vercel ≥ 0 < 1.41.0
- vulnerable
- ≥ 1.41.0
- patched
Reported fixes
The vendor has released @waline/vercel version 1.41.0, which addresses this issue. The recommended fix validates that the email and password fields submitted to the login endpoint are strings before they are used in the database query, and as defense in depth, the storage query logic should reject (rather than silently drop) values that are neither strings nor a supported array form.
How this was built
2 source records were collected, matched and used to prepare the report above.
-
GitHub Advisory Database database
-
OSV.dev database
Revision history
- Published
- Generated