CVE-2024-21521: @discordjs/opus vulnerable to Denial of Service
7.5
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.5043%
CWE
Published
7/10/2024
Updated
7/31/2024
KEV Status
No
Technology
JavaScript
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
| Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
|---|---|---|---|
| @discordjs/opus | npm | <= 0.9.0 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from improper input validation in functions that convert arguments to numbers using ToNumber() without type checking. The PoC demonstrates crashes when passing objects with toString properties to these functions. All four functions shown in the node-opus.cc code (constructor, setBitrate, applyEncoderCTL, applyDecoderCTL) exhibit this pattern of unsafe input handling, matching the advisory's description of multiple vulnerable entry points. The direct correlation between PoC test cases and function implementations confirms their vulnerability.