CVE-2024-21521
JavaScript vulnerability analysis and mitigation

Overview

CVE-2024-21521 affects all versions of the package @discordjs/opus, which is a native bindings to libopus. The vulnerability was disclosed on February 20, 2024, and published on July 9, 2024. This security issue has been classified as a Denial of Service (DoS) vulnerability with a CVSS v3.1 base score of 7.5 (High) (Snyk).

Technical details

The vulnerability is caused by providing an input object with a property toString to several different functions in the package. The affected functions include new OpusEncoder, setBitrate, applyEncoderCTL, and applyDecoderCTL. The vulnerability is tracked as CWE-400 (Uncontrolled Resource Consumption) and has a CVSS vector string of CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H (Snyk, GitHub POC).

Impact

When successfully exploited, this vulnerability can lead to a complete system crash, resulting in a total loss of availability. The attack can be executed remotely without requiring any special privileges or user interaction, making it particularly dangerous for systems using the affected package (Snyk).

Exploitability

The vulnerability has been confirmed to be easily exploitable, with a proof-of-concept (POC) available. The POC demonstrates that the vulnerability can be triggered using multiple attack vectors through different function calls in the package. The exploit has been tested on Ubuntu 22.04.3 LTS with Node v18.19.0 (GitHub POC).

Mitigation and workarounds

The recommended mitigation is to upgrade @discordjs/opus to version 0.10.0 or higher, which contains the fix for this vulnerability (Snyk).

Additional resources


SourceThis report was generated using AI

Related JavaScript vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-77415CRITICAL9.3
  • JavaScript logoJavaScript
  • jsonata
NoYesAug 21, 2026
CVE-2026-77414CRITICAL9.3
  • JavaScript logoJavaScript
  • jsonata
NoYesAug 21, 2026
CVE-2026-77413CRITICAL9.3
  • JavaScript logoJavaScript
  • jsonata
NoYesAug 21, 2026
CVE-2026-63421HIGH7.5
  • JavaScript logoJavaScript
  • @keystone-6/core
NoYesAug 21, 2026
CVE-2026-53509MEDIUM5.7
  • JavaScript logoJavaScript
  • @aborruso/ckan-mcp-server
NoYesAug 21, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management