Denial of Service Vulnerability in Opus Package: CVE-2022-25345

opus Updated 02 Oct 2025

Summary

17/06/2022
N/A
Yes i
High
7.5

ALPINE-CVE-2022-25345: All versions of package @discordjs/opus are vulnerable to Denial of Service (DoS) when trying to encode using an encoder with zero channels, or a non-initialized buffer. Affects opus versions < 0. No fix is published. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

The Opus package is a widely used audio codec library that enables high-quality audio streaming and encoding. It is particularly popular in applications that require real-time audio processing, such as voice over IP (VoIP) and online gaming. The package is designed to handle various audio formats and provides efficient encoding and decoding capabilities. However, it has been identified to have a critical vulnerability that can lead to a Denial of Service (DoS) attack, impacting the stability and availability of applications relying on it.

Vulnerability Detail

All versions of the Opus package are vulnerable to a Denial of Service (DoS) attack when an encoder is used with zero channels or a non-initialized buffer. This vulnerability can lead to a hard crash of the application, making it unresponsive and potentially affecting the user experience. The vulnerability arises from improper handling of audio encoding parameters, which can be exploited by malicious actors to disrupt service.

How To Fix

To fix this vulnerability, it is essential to update the Opus package to a patched version. As of now, there are no fixed versions available for the affected Alpine ecosystems (v3.18 to v3.22). Users should regularly check for updates and apply them as soon as they are released.

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary workaround, avoid using encoders with zero channels or uninitialized buffers. Ensure that all audio encoding operations are performed with properly initialized parameters to prevent triggering the vulnerability.

Conclusion

The Opus package is currently vulnerable to a Denial of Service attack, which can severely impact applications that rely on it for audio processing. Users are advised to monitor for updates and apply any patches as soon as they become available. In the meantime, implementing workarounds can help mitigate the risk.

See every vulnerability recorded for opus →

Share this vulnerability

FAQ

CVE-2022-25345 is a vulnerability in the Opus package that can lead to a Denial of Service (DoS) when using an encoder with zero channels or a non-initialized buffer.

This vulnerability can cause your application to crash, leading to service interruptions and a poor user experience.

Currently, there are no patched versions available for the Opus package in the affected Alpine ecosystems.

Avoid using encoders with zero channels or uninitialized buffers as a temporary workaround until a patch is released.

You can use Vulert, which monitors and alerts for open-source vulnerabilities in your software using just a manifest file like package-lock.json. You can also check your application for this vulnerability using the Vulert playground.

Related vulnerabilities

Recent vulnerabilities recorded for opus.

How To Fix

To fix this vulnerability, it is essential to update the Opus package to a patched version. As of now, there are no fixed versions available for the affected Alpine ecosystems (v3.18 to v3.22). Users should regularly check for updates and apply them as soon as they are released.

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback