Know every vulnerabilitybefore it knows you.
DevGuard continuously monitors your dependencies and alerts you when CVEs like this one affect your stack — with real-time threat intelligence built for developers.
GHSA-cw6x-mw64-q6pv
No affected components available
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
- Endpoint: UserWhatsAppAPI.ts
- Service: UserWhatsAppService.ts
- Verify ownership (present in verify endpoint for comparison): UserWhatsAppAPI.ts
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
- Valid attacker account with access to a project
- Attacker access token
- A victim’s
UserWhatsAppitemId belonging to the same project
Steps to Reproduce
-
Set your attacker token:
export ATK="Bearer <attacker-access-token>" -
Trigger resend for the victim’s item:
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
- HTTP 200 with
{}body and a new verification code sent to the victim’s phone - No checks confirm that
item.userIdequals the authenticated user’s ID for the resend path
Impact
- Spam/DoS against victims’ phone numbers, social engineering pressure, and potential lockout flows due to repeated resends
Recommended Fix
- Enforce ownership:
item.userIdmust match the authenticated user - Add per-item and per-user rate limiting for resends
The vulnerability can be exploited over the network without needing physical access. It is easy for an attacker to exploit this vulnerability. An attacker needs basic access or low-level privileges. No user interaction is needed for the attacker to exploit this vulnerability.
Limited exploitation activity has been observed. Close monitoring and planned remediation are recommended.
The exploit probability is very low. The vulnerability is unlikely to be exploited in the next 30 days.
We did not find any exploit available. Neither in GitHub repositories nor in the Exploit-Database.
Browse More
Continuously monitor your dependencies and get alerted when vulnerabilities like this one affect your stack.
Checkout DevGuard