CVE-2022-0766: Server-Side Request Forgery in calibreweb

calibreweb Updated 02 Oct 2025

Summary

08/03/2022
Yes i
Critical
9.8

CVE-2022-0766: Server-Side Request Forgery in calibreweb. Affects calibreweb versions < 0.6.17. Fixed in 0.6.17. 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 Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

calibreweb is a Python package available on PyPI that provides a web interface for managing and accessing an ebook library. It allows users to browse, search, and download ebooks from their calibre library. The package is widely used by individuals and organizations to organize and access their ebook collections. However, calibreweb versions prior to 0.6.17 are vulnerable to a server-side request forgery (SSRF) attack.

Vulnerability Detail

The vulnerability in calibreweb is due to an incomplete fix for CVE-2022-0339. The blacklist implemented to prevent SSRF attacks does not check for the IP address 0.0.0.0, which can be used as a payload to resolve to localhost. An attacker can exploit this vulnerability to make unauthorized requests to internal resources, potentially leading to information disclosure, remote code execution, or other malicious activities.

How To Fix

Latest published version: 0.6.27 as of 22 Oct 2026

pip install --upgrade "calibreweb==0.6.27"

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

0.6.17

This is the first release that contains the fix.

pip install --upgrade "calibreweb==0.6.17"

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

Workaround

If upgrading to the latest version is not immediately possible, users can implement a temporary workaround by manually modifying the source code. Specifically, the calibreweb.cps.helper.save_cover_from_url function should be updated to include a check for the IP address 0.0.0.0 and reject any requests containing this address. Here is an example of the modified code:

# Original code
def save_cover_from_url(url):
    # Existing code
    
    # Modified code
    if url == '0.0.0.0':
        raise ValueError('Invalid URL')
    
    # Existing code
    
    # Modified code
    
    return cover_path

Please note that this workaround is not a permanent solution and should be replaced with the official fix as soon as possible.

Conclusion

In conclusion, calibreweb versions prior to 0.6.17 are vulnerable to a server-side request forgery (SSRF) attack. This vulnerability can be exploited to make unauthorized requests to internal resources, potentially leading to serious consequences. Users are strongly advised to upgrade to calibreweb version 0.6.17 or later to mitigate this vulnerability. If immediate upgrade is not possible, a temporary workaround can be implemented by modifying the source code. For further assistance and support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for calibreweb →

Share this vulnerability

FAQ

calibreweb is a Python package that provides a web interface for managing and accessing an ebook library. It allows users to browse, search, and download ebooks from their calibre library.

Server-side request forgery (SSRF) is a vulnerability that allows an attacker to make unauthorized requests to internal resources from a vulnerable server. In this case, the SSRF vulnerability in calibreweb allows an attacker to send requests to internal resources by exploiting the incomplete fix for CVE-2022-0339.

Exploiting this vulnerability can lead to various malicious activities, including information disclosure, remote code execution, and unauthorized access to internal resources. It is important to upgrade to the latest version of calibreweb to mitigate these risks.

To fix this vulnerability, you should upgrade to calibreweb version 0.6.17 or later. This version includes a complete fix for the SSRF vulnerability. You can update your calibreweb installation by running the command: pip install --upgrade calibreweb.

If upgrading to the latest version is not immediately possible, you can implement a temporary workaround by modifying the source code of the calibreweb.cps.helper.save_cover_from_url function. The workaround involves adding a check for the IP address 0.0.0.0 and rejecting any requests containing this address. Please refer to the provided code example for more details.

Related vulnerabilities

Recent vulnerabilities recorded for calibreweb.

How To Fix

Latest published version: 0.6.27 as of 22 Oct 2026

pip install --upgrade "calibreweb==0.6.27"

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

0.6.17

This is the first release that contains the fix.

pip install --upgrade "calibreweb==0.6.17"

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