CVE-2025-30160: Redlib Denial of Service Vulnerability

HIGH
Advisory Identifier: GHSA-g8vq-v3mg-7mrg
CWE-502 CWE-400
Published
Advisory Summary

CVE-2025-30160 is a HIGH denial of service vulnerability (CWE-502: Deserialization of Untrusted Data) affecting Redlib libraries in the crates.io ecosystem. The issue involves redlib allows a denial of service via deflate decompression bomb in restore_preferences form. Remediation is available by upgrading affected packages to version 0.36.0.

CVE-2025-30160 at a Glance

CVE Identifier CVE-2025-30160
GHSA Identifier GHSA-g8vq-v3mg-7mrg
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-502: Deserialization of Untrusted Data
Affected Product Redlib
Package Ecosystem crates.io
Published Date
Last Updated

How to Fix CVE-2025-30160

To remediate this vulnerability, upgrade all affected Redlib dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

redlib fixed: 0.36.0
Upgrade redlib to 0.36.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for redlib

How to Check if You Are Affected

To determine whether your application is affected by CVE-2025-30160, inspect your project dependencies for Redlib:

inspect dependencies for redlib

Analyze the terminal output to locate any version of Redlib in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.36.0), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-502: Deserialization of Untrusted Data, where the product deserializes untrusted data without sufficiently ensuring that the resulting data will be valid. In Redlib, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

A vulnerability has been identified in Redlib where an attacker can cause a denial-of-service (DOS) condition by submitting a specially crafted base2048-encoded DEFLATE decompression bomb to the restore_preferences form. This leads to excessive memory consumption and potential system instability, which can be exploited to disrupt Redlib instances. This vulnerability was introduced in 2e95e1fc6e2064ccfae87964b4860bda55eddb9a and fixed in 15147cea8e42f6569a11603d661d71122f6a02dc. ### Impact _What kind of vulnerability is it? Who is impacted?_ This vulnerability allows a remote attacker with network access to exploit the preference restoration mechanism by providing a compressed payload that expands dramatically upon decompression. The issue arises because the system automatically decompresses user-supplied data without enforcing size limits, potentially leading to: - Out-of-memory (OOM) conditions - OS-level resource exhaustion, potentially leading to broader system instability or crashes - Repeated exploitation, keeping the target system in a persistent degraded state - Denial-of-service of any public instance ### Patches The problem has been patched in 15147cea8e42f6569a11603d661d71122f6a02dc. Users should upgrade to v0.36.0. ### Workarounds Until a patch is available, users can: - Implement request size limits at the web server or application level to reject excessively large inputs. - Disable or restrict the restore_preferences route (`/settings/encoded-restore`) at the reverse-proxy level if not required. - Monitor server logs for unusually large or repeated restore_preferences requests and block offending IPs.

CVE-2025-30160 Affected Redlib Versions

1 component(s)
Fixed Versions:
0.36.0
Product / Package Ecosystem Affected Versions Fixed Version
redlib
crates.io
< 0.36.0
0.36.0

References

Frequently Asked Questions

What is CVE-2025-30160?
CVE-2025-30160 is a security vulnerability in Redlib involving Redlib allows a Denial of Service via DEFLATE Decompression Bomb in restore_preferences Form under CWE-502: Deserialization of Untrusted Data.
Which Redlib versions are affected?
Affected versions include releases prior to 0.36.0 across affected packages: redlib.
What version fixes CVE-2025-30160?
Upgrading to 0.36.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is redlib affected?
Yes, redlib is affected in releases prior to 0.36.0. Upgrade your dependency to 0.36.0 or later.
What CWE is associated with CVE-2025-30160?
CVE-2025-30160 is classified under CWE-502: Deserialization of Untrusted Data (The product deserializes untrusted data without sufficiently ensuring that the resulting data will be valid.).
How can I check crates.io dependencies for CVE-2025-30160?
Run the dependency tree command: 'inspect dependencies for redlib'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-g8vq-v3mg-7mrg",
  "modified" : "2025-03-21T15:26:55Z",
  "published" : "2025-03-21T15:26:55Z",
  "aliases" : [ "CVE-2025-30160" ],
  "summary" : "Redlib allows a Denial of Service via DEFLATE Decompression Bomb in restore_preferences Form",
  "details" : "A vulnerability has been identified in Redlib where an attacker can cause a denial-of-service (DOS) condition by submitting a specially crafted base2048-encoded DEFLATE decompression bomb to the restore_preferences form. This leads to excessive memory consumption and potential system instability, which can be exploited to disrupt Redlib instances. This vulnerability was introduced in 2e95e1fc6e2064ccfae87964b4860bda55eddb9a and fixed in 15147cea8e42f6569a11603d661d71122f6a02dc.\n\n### Impact\n_What kind of vulnerability is it? Who is impacted?_\n\nThis vulnerability allows a remote attacker with network access to exploit the preference restoration mechanism by providing a compressed payload that expands dramatically upon decompression. The issue arises because the system automatically decompresses user-supplied data without enforcing size limits, potentially leading to:\n\n- Out-of-memory (OOM) conditions\n- OS-level resource exhaustion, potentially leading to broader system instability or crashes\n- Repeated exploitation, keeping the target system in a persistent degraded state\n- Denial-of-service of any public instance\n\n### Patches\nThe problem has been patched in 15147cea8e42f6569a11603d661d71122f6a02dc. Users should upgrade to v0.36.0.\n\n### Workarounds\nUntil a patch is available, users can:\n\n- Implement request size limits at the web server or application level to reject excessively large inputs.\n- Disable or restrict the restore_preferences route (`/settings/encoded-restore`) at the reverse-proxy level if not required.\n- Monitor server logs for unusually large or repeated restore_preferences requests and block offending IPs.",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "crates.io",
      "name" : "redlib"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.36.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/crewjam/saml/security/advisories/GHSA-5mqj-xc49-246p"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/redlib-org/redlib/security/advisories/GHSA-g8vq-v3mg-7mrg"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-30160"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/redlib-org/redlib/commit/15147cea8e42f6569a11603d661d71122f6a02dc"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/redlib-org/redlib/commit/2e95e1fc6e2064ccfae87964b4860bda55eddb9a"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/redlib-org/redlib"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-400", "CWE-502" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-03-21T15:26:55Z",
    "nvd_published_at" : "2025-03-20T19:15:38Z"
  }
}