Checkmate: Pending Invite Takeover via NoSQL Injection in Registration

An unauthenticated attacker sends an object with $ne in place of the invite token during registration, matches any pending invite and receives an account with that invite's email address and role.

Advisory ID: TP-2026-160
Product: Checkmate (self-hosted uptime monitoring)
Vulnerability type: NoSQL injection (CWE-943)
CVE: not requested
CVSS 3.1: 8.1 (High) · CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
Affected versions: before v3.12.0 (verified live: v3.8.1, commit 73b74ffd)
Fixed in: v3.12.0
Reported: 3 July 2026

Summary

Checkmate is a self-hosted uptime monitoring application with a Node/Express server and MongoDB; further accounts are created through invites issued by an administrator. The registration endpoint POST /api/v1/auth/register passes the token field of the request body unvalidated as a filter to findOneAndDelete. An object such as {"$ne":null} in place of the string matches every pending invite. The server copies the email address, role and team of the matched invite onto the new account, and the caller sets the password. An unauthenticated attacker thereby registers as the invited person without knowing the token and receives its role, admin in the test.

Root cause

Line numbers refer to v3.8.1: registerUser reads req.body.token raw (server/src/controllers/authController.ts:59), while registrationBodyValidation.parse checks only the sub-object req.body.user (server/src/controllers/authController.ts:64).
The service passes the value to invitesRepository.findByTokenAndDelete(inviteToken) (server/src/service/business/userService.ts:121), and the repository runs InviteModel.findOneAndDelete with the filter { token } on it (server/src/repositories/invites/MongoInviteRepository.ts:54).
The global sanitizeBody cleanup sanitizes string values but leaves object keys such as $ne unchanged.
Role, team and email address of the new account come from the matched invite (server/src/service/business/userService.ts:122-124).
The check of the same token under /invite/verify requires a string with z.string().min(1), and the registration path lacks that type check.

Proof of Concept

POST /api/v1/auth/register HTTP/1.1
Content-Type: application/json

{"user":{"firstName":"Att","lastName":"Acker","email":"[email protected]","password":"AttackerPw1!"},"token":{"$ne":null}}

HTTP/1.1 200
... "msg":"User registered successfully" ... "email":"[email protected]" ... "role":["admin"] ... "token":"<JWT>" ...

{"$ne":null} is evaluated as a MongoDB operator and matches every invite document. Verified on v3.8.1 in Docker: a pending invite for [email protected] with the role admin existed beforehand and its token was unknown to the attacker; the response carries the invite's email address instead of the submitted one and a valid JWT with the role admin. The precondition is a set-up instance with at least one pending invite; invites are valid for 3600 seconds. As the control, /invite/verify rejects the same object with a type error.

Impact

  • Takeover of a pending invite without authentication and without knowing the token; the account carries the email address, team and role of the invited person.
  • For an invite with the role admin, the attacker receives a valid administrator JWT.
  • The invite is deleted in the process and is no longer available to the invited person.

References

Is Something Like This in Your Software?

Our team found this vulnerability during its work. Have your applications tested by the same specialists, with a penetration test from turingpoint.