GHSA-JF75-Q64Q-G65R

GHSA-JF75-Q64Q-G65R is a medium-severity improper authentication vulnerability in @waline/vercel (npm), affecting versions <= 1.40.3. It is fixed in 1.41.0.

Does this CVE actually affect you?

Kodem shows which CVEs are reachable and running in your applications, so you fix what's exploitable, not just what's listed.

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

Runtime intelligence, not another scanner.

Summary

Waline login accepts a non-string email as a match-all MongoDB query

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. ["!=", ""], is a genuine operator injection that reaches $ne with the same match-all effect.)

First user is selected, token.js:22-26:

    if (think.isEmpty(user) || isVerifyUser || isBannedUser) { return this.fail(); }   // match-all -> not empty -> passes
    const checkPassword = this.checkPassword(password, user[0].password);

user[0] is the first record in MongoDB natural (insertion) order, i.e. the earliest-registered user, which in Waline is the administrator.

No upstream type validation, packages/server/src/logic/token.js:37-38:

    async postAction() { await this.useCaptchaCheck(); }

The only pre-check is the captcha; there is no isString(email/password) validation.

Proof of Concept

Send a login request whose email is a non-string value:

    POST /api/token  HTTP/1.1
    Content-Type: application/json

    {"email": {"$ne": null}, "password": "<password-to-test>"}
  • Because email is not a string, parseWhere adds nothing for it, so the query filter is {} and MongoDB returns all users.
  • user[0], the first-registered user, i.e. the administrator, is selected, and the submitted password is checked against the administrator's hash.
  • If the password matches (for example via credential stuffing or a known/weak password), the attacker is authenticated as the administrator without ever knowing the administrator's email.
  • Even when the password does not match, the request confirms that users exist (enumeration) and that the email factor is bypassable.

Impact

An unauthenticated attacker can bypass the email/identifier factor of authentication for the first-registered user (the administrator) and have an arbitrary password checked directly against that account. This:

  • enables user enumeration;
  • amplifies credential stuffing against the administrator (no need to know the admin email, a leaked or weak password can be tested directly);
  • and, when the attacker possesses a valid password for that account (e.g. a reused/breached one), results in administrator login.

This is bounded: it is NOT a zero-knowledge authentication bypass, it does NOT reveal passwords, and it targets the first-returned user rather than an arbitrary chosen account. It is rated Medium accordingly. (If exploitation succeeds in logging in, the attacker then holds the administrator session; that downstream impact is conditional on already having a valid password, which is reflected in the High attack complexity rather than in the confidentiality/integrity metrics.)

The application does not adequately verify the identity of a user, device, or process before granting access. Typical impact: unauthorized access to functions or data reserved for authenticated parties.

GHSA-JF75-Q64Q-G65R has a CVSS score of 6.5 (Medium). The vector is network-reachable, no privileges required, and no user interaction. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (1.41.0); upgrading removes the vulnerable code path.

Affected versions

@waline/vercel (<= 1.40.3)

Security releases

@waline/vercel → 1.41.0 (npm)

Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.

Already deployed Kodem?

See it in your environmentNew to Kodem? Get a demo →

Remediation advice

Validate the types of email and password as strings before they reach the storage query, for example in packages/server/src/logic/token.js postAction():

    const { email, password } = this.post();
    if (!think.isString(email) || !think.isString(password)) {
      return this.ctx.throw(400, 'Invalid input type');
    }

Defense in depth: in mongodb.js parseWhere(), reject (rather than silently drop) a value that is neither a string nor a supported array form, or coerce it to {$eq: String(value)}, so a non-string key can never elide the filter.

Frequently Asked Questions

  1. What is GHSA-JF75-Q64Q-G65R? GHSA-JF75-Q64Q-G65R is a medium-severity improper authentication vulnerability in @waline/vercel (npm), affecting versions <= 1.40.3. It is fixed in 1.41.0. The application does not adequately verify the identity of a user, device, or process before granting access.
  2. How severe is GHSA-JF75-Q64Q-G65R? GHSA-JF75-Q64Q-G65R has a CVSS score of 6.5 (Medium). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
  3. Which versions of @waline/vercel are affected by GHSA-JF75-Q64Q-G65R? @waline/vercel (npm) versions <= 1.40.3 is affected.
  4. Is there a fix for GHSA-JF75-Q64Q-G65R? Yes. GHSA-JF75-Q64Q-G65R is fixed in 1.41.0. Upgrade to this version or later.
  5. Is GHSA-JF75-Q64Q-G65R exploitable, and should I be worried? Whether GHSA-JF75-Q64Q-G65R is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
  6. What actually determines whether GHSA-JF75-Q64Q-G65R is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
  7. How do I fix GHSA-JF75-Q64Q-G65R? Upgrade @waline/vercel to 1.41.0 or later.

Stop the waste.
Protect your environment with Kodem.