CVE-2022-30765: SQL injection in calibreweb

calibreweb Updated 02 Oct 2025

Summary

17/05/2022
Yes i
Critical
9.8

CVE-2022-30765: SQL injection in calibreweb. Affects calibreweb versions < 0.6.18. Fixed in 0.6.18. 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 Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

Background

Calibre-Web is an open-source web application that provides a user-friendly interface for managing and accessing e-book libraries. It allows users to browse, search, and download e-books from their Calibre library. The vulnerability identified as CVE-2022-30765 affects Calibre-Web versions prior to 0.6.18. This vulnerability allows an attacker to perform SQL injection attacks on the user table, potentially leading to unauthorized access, data manipulation, or data leakage.

Vulnerability Detail

The SQL injection vulnerability in Calibre-Web arises due to insufficient input validation and sanitization. By crafting malicious input, an attacker can manipulate the SQL queries executed by the application, bypassing intended access controls and injecting arbitrary SQL code. This can result in the execution of unintended SQL commands, such as SELECT, INSERT, UPDATE, or DELETE, leading to unauthorized access to sensitive data, modification of data, or even the complete compromise of the underlying database. The severity of this vulnerability is rated as CRITICAL with a CVSS score of 9.8.

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.18

This is the first release that contains the fix.

pip install --upgrade "calibreweb==0.6.18"

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

Workaround

As a temporary workaround, it is advisable to implement input validation and sanitization mechanisms to prevent the injection of malicious SQL code. This can be achieved by using parameterized queries or prepared statements when interacting with the database. Additionally, enforcing strict input validation on user-supplied data can help mitigate the risk of SQL injection attacks.

Conclusion

The SQL injection vulnerability in Calibre-Web (CVE-2022-30765) poses a significant risk to the confidentiality, integrity, and availability of the application and its underlying data. It is crucial to promptly upgrade to version 0.6.18 or later to mitigate this vulnerability. Implementing input validation and sanitization mechanisms can serve as a temporary workaround until the upgrade is performed. For further assistance or support in vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for calibreweb →

Share this vulnerability

FAQ

Calibre-Web is an open-source web application that provides a user-friendly interface for managing and accessing e-book libraries. It allows users to browse, search, and download e-books from their Calibre library.

SQL injection is a web application vulnerability that allows an attacker to manipulate SQL queries executed by the application. By injecting malicious SQL code, an attacker can bypass access controls and perform unauthorized actions on the database.

The SQL injection vulnerability in Calibre-Web can lead to unauthorized access to sensitive data, data manipulation, or data leakage. An attacker could extract or modify user information, compromise the integrity of the database, or even gain full control over the underlying system.

You can use the Vulert Playground (https://vulert.com/scanner) to check if your Calibre-Web installation is affected by this vulnerability. Simply provide your Pipfile.lock file, and Vulert will analyze it for any open-source vulnerabilities, including CVE-2022-30765.

Related vulnerabilities

Recent vulnerabilities recorded for calibreweb.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

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.18

This is the first release that contains the fix.

pip install --upgrade "calibreweb==0.6.18"

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