Panic Vulnerability in AES Functions of Ring Package: Overflow Check Issue

ring Updated 14 Dec 2025

Summary

07/03/2025
MODERATE
Yes i
Moderate
6.6

GHSA-4p46-pwfr-66x6: Some AES functions may panic when overflow checking is enabled in ring. Affects ring versions < 0.17.12. Fixed in 0.17.12. 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 Ring package is a widely used cryptographic library in Rust, known for its performance and security features. It provides implementations of various cryptographic algorithms, including AES for encryption and decryption. However, certain functions within the library may panic under specific conditions, particularly when overflow checking is enabled, which can lead to potential security risks.

Vulnerability Detail

The vulnerability arises from the ring::aead::quic::HeaderProtectionKey::new_mask() function, which may panic when overflow checking is enabled. In the QUIC protocol, an attacker can exploit this vulnerability by sending specially-crafted packets, potentially causing a panic in the application. This panic can occur unintentionally in approximately 1 out of every 2^32 packets sent or received. Additionally, on 64-bit targets, operations using ring::aead::{AES_128_GCM, AES_256_GCM} may panic when encrypting or decrypting around 68,719,476,700 bytes (about 64 gigabytes) of data in a single chunk. While protocols like TLS and SSH are not affected due to their chunking of data, applications that handle large data in one chunk are at risk. Overflow checking is typically enabled in debug mode, but can be turned on in release mode using specific flags.

How To Fix

Minimum fixed version

0.17.12

This is the first release that contains the fix.

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

Workaround

As a temporary workaround, avoid enabling overflow checks in release mode by not using the RUSTFLAGS="-C overflow-checks" setting or by setting overflow-checks = false in your Cargo.toml profile. This will prevent the panic from occurring, but it is advisable to update to the patched version as soon as possible.

Conclusion

In summary, the Ring package has a vulnerability related to panic in AES functions when overflow checking is enabled. It is crucial to update to version 0.17.12 or later to mitigate this risk. Users should also consider using Vulert to monitor for vulnerabilities in their applications.

See every vulnerability recorded for ring →

Share this vulnerability

FAQ

The vulnerability is a potential panic in the Ring package's AES functions when overflow checking is enabled, which can be exploited through specially-crafted packets.

You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability without requiring any signup.

If exploited, this vulnerability can lead to application crashes, which may disrupt services and expose sensitive data.

No, this vulnerability is present in versions prior to 0.17.12. Updating to 0.17.12 or later resolves the issue.

If immediate updating is not possible, consider disabling overflow checks in your release builds as a temporary workaround.

Related vulnerabilities

Recent vulnerabilities recorded for ring.

How To Fix

Minimum fixed version

0.17.12

This is the first release that contains the fix.

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