5.8medium
whatsapp-api-js fails to validate message's signature
- Severity
- 5.8medium CVSS:3.1 by GitHub_M
- Exploit likelihood
- 14.5% (higher than 96% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-mwhf-vhr5-7j23
Description
whatsapp-api-js is a TypeScript server agnostic Whatsapp's Official API framework. It's possible to check the payload validation using the WhatsAppAPI.verifyRequestSignature and expect false when the signature is valid. Incorrect Access Control, anyone using the post or verifyRequestSignature methods to handle messages is impacted. This vulnerability is fixed in 4.0.3.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| Secreto31126 whatsapp-api-js | >= 4.0.0, < 4.0.3, from 4.0.0 before 4.0.3 | CVE List, NVD |
| whatsapp-api-js (npm) | from 4.0.0 before 4.0.3 | GitHub Advisory Database |
All scores
| GitHub_M | 5.8medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:L/A:N |
| GitHub | 5.8medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:L/A:N |
| GitHub | medium CVSS:4.0 | CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:N/VI:L/VA:N/SC:N/SI:L/SA:N |
| NVD | 5.3medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.
What each source says
CVE List
whatsapp-api-js is a TypeScript server agnostic Whatsapp's Official API framework. It's possible to check the payload validation using the WhatsAppAPI.verifyRequestSignature and expect false when the signature is valid. Incorrect Access Control, anyone using the post or verifyRequestSignature methods to handle messages is impacted. This vulnerability is fixed in 4.0.3.
GitHub Advisory Database
Impact
Incorrect Access Control, anyone using the post or verifyRequestSignature methods to handle messages is impacted.
Patches
Patched in version 4.0.3.
Workarounds
It's possible to check the payload validation using the WhatsAppAPI.verifyRequestSignature and expect false when the signature is valid.
function doPost(payload, header_signature) {
if (whatsapp.verifyRequestSignature(payload.toString(), header_signature) {
throw 403;
}
// Now the payload is correctly verified
whatsapp.post(payload);
}
References
NVD (es)
whatsapp-api-js es un framework API oficial de WhatsApp independiente del servidor TypeScript. Es posible comprobar la validación del payload mediante WhatsAppAPI.verifyRequestSignature y esperar un resultado falso cuando la firma es válida. Control de acceso incorrecto: cualquiera que utilice los métodos post o verifiedRequestSignature para gestionar mensajes se ve afectado. Esta vulnerabilidad se corrigió en la versión 4.0.3.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2024-45607 changed 2024-09-12 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-mwhf-vhr5-7j23 changed 2024-09-12 | CC-BY-4.0 |
| NVD | CVE-2024-45607 changed 2026-06-17 | Public domain |