CVE-2025-6998: Calibreweb Denial of Service Vulnerability

HIGH
Advisory Identifier: GHSA-2g7m-ph9x-7q7m
CWE-1333
Published
Advisory Summary

CVE-2025-6998 is a HIGH denial of service vulnerability (CWE-1333: Inefficient Regular Expression Complexity) affecting Calibreweb libraries in the PyPI ecosystem. The issue involves calibre web and autocaliweb have a redos vulnerability. Remediation is available in the latest vendor maintenance releases.

CVE-2025-6998 at a Glance

CVE Identifier CVE-2025-6998
GHSA Identifier GHSA-2g7m-ph9x-7q7m
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-1333: Inefficient Regular Expression Complexity
Affected Product Calibreweb
Package Ecosystem PyPI
Published Date
Last Updated

How to Fix CVE-2025-6998

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

calibreweb fixed: Latest secure release
pip install calibreweb>=Latest secure release
Verify Direct and Transitive Dependencies

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

pip show calibreweb

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2025-6998, inspect your installed packages using pip:

pip show calibreweb

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

Note: The pip show calibreweb command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-1333: Inefficient Regular Expression Complexity, where the product uses a regular expression with a worst-case computational complexity that is inefficient and possibly exponential. In Calibreweb, 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

ReDoS in strip_whitespaces() function in cps/string_helper.py in Calibre Web and Autocaliweb allows unauthenticated remote attackers to cause denial of service via specially crafted username parameter that triggers catastrophic backtracking during login. This issue affects Calibre Web: 0.6.24 (Nicolette); Autocaliweb: from 0.7.0 before 0.7.1.

CVE-2025-6998 Affected Calibreweb Versions

1 component(s)
Product / Package Ecosystem Affected Versions Fixed Version
calibreweb
PyPI
≤ 0.6.24

References

Frequently Asked Questions

What is CVE-2025-6998?
CVE-2025-6998 is a security vulnerability in Calibreweb involving Calibre Web and Autocaliweb have a ReDoS vulnerability under CWE-1333: Inefficient Regular Expression Complexity.
Which Calibreweb versions are affected?
Affected versions include releases prior to current release patches across affected packages: calibreweb.
What version fixes CVE-2025-6998?
Upgrading to current release patches (or the latest patched release for your respective branch) resolves the vulnerability.
Is calibreweb affected?
Yes, calibreweb is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What CWE is associated with CVE-2025-6998?
CVE-2025-6998 is classified under CWE-1333: Inefficient Regular Expression Complexity (The product uses a regular expression with a worst-case computational complexity that is inefficient and possibly exponential.).
How can I check PyPI dependencies for CVE-2025-6998?
Run the dependency tree command: 'pip show calibreweb'. 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-2g7m-ph9x-7q7m",
  "modified" : "2025-07-28T14:53:43Z",
  "published" : "2025-07-24T21:30:39Z",
  "aliases" : [ "CVE-2025-6998" ],
  "summary" : "Calibre Web and Autocaliweb have a ReDoS vulnerability",
  "details" : "ReDoS in strip_whitespaces() function in cps/string_helper.py in Calibre Web and Autocaliweb allows unauthenticated remote attackers to cause denial of service via specially crafted username parameter that triggers catastrophic backtracking during login. This issue affects Calibre Web: 0.6.24 (Nicolette); Autocaliweb: from 0.7.0 before 0.7.1.",
  "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" : "PyPI",
      "name" : "calibreweb"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "last_affected" : "0.6.24"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-6998"
  }, {
    "type" : "WEB",
    "url" : "https://fluidattacks.com/advisories/megadeth"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/gelbphoenix/autocaliweb"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/janeczku/calibre-web"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-1333" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-07-28T14:53:43Z",
    "nvd_published_at" : "2025-07-24T20:15:27Z"
  }
}