SQLCipher 5.0.0-beta

2026-09-15 08:00:00 -0400

We are pleased to announce the immediate availability of SQLCipher 5.0.0-beta. Many of the features in this beta have been under development for over a year and we are excited to share them with the SQLCipher community for testing.

WARNING: This should only be used for beta testing at this time, not in production. It includes major functional, API, and behavioral changes that are NOT COMPATIBLE with SQLCipher 4 and earlier by default.

This is a major update that includes the following architectural improvements, security enhancements, new functionality, and other changes:

VFS Architecture

The most significant update in the new version is the replacement of the legacy CODEC hook with SQLite Virtual Filesystem (VFS) shims. VFS allows SQLCipher to transparently intercept file I/O for encryption and decryption using public SQLite APIs. As a result of this redesign, many files previously modified by SQLCipher have been reverted to unmodified upstream SQLite sources.

AEAD Encryption (AES-256-GCM)

Authenticated Encryption with Associated Data (AEAD) using AES-256-GCM is the new default, replacing the previous AES-256-CBC + HMAC-SHA512 design. This addresses one of SQLCipher’s most requested security improvements. GCM provides a modern, standard, and widely implemented authenticated encryption mode. It improves SQLCipher’s design by replacing the previously separate encryption and MAC steps.

KDF Iteration Changes

The default iteration count for PBKDF2-HMAC-SHA512 is now 512K (up from 256K). While the previous default meets the OWASP recommendation of 220K iterations, this increase provides a larger margin and should remain a reasonable SQLCipher 5 default for many years to come.

Default Page Size

The default database page size is now 8192 bytes (up from 4096). Switching to an 8K page size reduces per-page encryption overhead and performs well for both bulk operations and smaller statements.

PRAGMA rekey for Encryption/Decryption

We’ve expanded PRAGMA rekey to convert plaintext databases to encrypted, and vice versa. This greatly simplifies the process for converting unsecured applications to use SQLCipher while preserving existing data. To encrypt an existing plaintext database, open the database as normal and then set a key:

sqlite3 plaintext.db
PRAGMA rekey = 'YourKeyGoesHere';

Other Potentially Breaking Changes

  • Historically deprecated PRAGMA settings are removed: cipher_store_pass, cipher, fast_kdf_iter, cipher_hmac_pgno, cipher_hmac_salt_mask, rekey_cipher, and rekey_kdf_iter
  • SQLCipher is now built at compile time by default (it is no longer necessary to define SQLITE_HAS_CODEC)
  • The sqlcipher_provider interface has been expanded with AEAD and KBKDF functions that must be implemented in custom cryptographic providers
  • The CommonCrypto provider is now deprecated and requires a special override define to compile (GCM is not available through the public API)
  • Keying :memory: databases is now an explicit misuse error
  • Compile-time macros -DSQLITE_USE_URI and -DSQLITE_DIRECT_OVERFLOW_READ=0 are now required
  • Internal function names in sqlcipher.h have been renamed as part of the VFS redesign (not part of the SQLite API)

Compatibility and Migration

The default v5 database settings are not backwards-compatible with SQLCipher 4 databases. Application code changes are required to take advantage of the new defaults. To open or migrate existing databases, the following options are available:

  • Migrate existing databases in place (preserving data and schema) with PRAGMA cipher_migrate.
  • Open older databases without migrating using PRAGMA cipher_compatibility to adjust settings back to their previous values. For example, to open a SQLCipher 4 database using 5.0.0-beta:
    PRAGMA key = 'YourKeyGoesHere';
    PRAGMA cipher_compatibility = 4;
    
  • Set a default compatibility level for an entire process using PRAGMA cipher_default_compatibility. All attached databases inherit this setting. For example, to set the process default before opening any encrypted databases:
    PRAGMA cipher_default_compatibility = 4;
    PRAGMA key = 'YourKeyGoesHere';
    
  • Convert plaintext databases to an encrypted database using the new PRAGMA rekey support described above.

Availability

SQLCipher 5.0.0-beta is available for download starting today, separate from the existing SQLCipher 4 releases, so you can begin testing in parallel with your current deployment.

Commercial and Enterprise - Your organization will find the new beta packages on the “Prerelease” tab of the Customer Downloads fulfillment site. Don’t forget to update the license code in your application(s) when you upgrade!

Community Edition - The source for SQLCipher 5.0.0-beta is available at the main repository beta tag on GitHub. SQLCipher for Apple is available from the SQLCipher.swift beta tag. SQLCipher for Android is available as source or a downloadable AAR package from the SQLCipher Android beta tag.

Feedback

We recommend testing this beta thoroughly to prepare applications and identify potential upgrade issues. For the time being, please direct feedback and questions to support@zetetic.net so all beta issues are reported in one place. We appreciate your help validating SQLCipher 5.0.0-beta in advance of an official release at a later date!

SQLCipher 4.19.0 Release

2026-09-08 08:00:00 -0400

We’re pleased to announce the availability of SQLCipher 4.19.0. This is a maintenance release that addresses two low-risk security issues in the core library, fixes several non-critical bugs, and updates cryptographic providers.

SQLCipher Changes

  • Reports an error if a database is opened with an invalid hexkey URI parameter
  • Includes the provider error code in KDF error messages
  • Fixes escaping of migration file names
  • Fixes escaping of database aliases in sqlcipher_export()
  • Avoids returning NULL rows from cipher_settings if allocation fails
  • Adjusts behavior for permanent error states
  • Avoids leaking a partially initialized context if an initialization error occurs
  • Fixes error reporting for failed rekey operations
  • Improves consistency of internal memory utilization tracking

SQLCipher Commercial and Enterprise packages include the following enhancements:

  • Updates non-FIPS OpenSSL-based cryptographic providers to 3.5.8 LTS
  • SQLCipher for Java is updated upstream sqlite-jdbc release 3.53.4.0

Advisory

This update includes fixes for two potential security issues affecting SQLCipher 4.18.0 and earlier:

  1. The sqlcipher_export convenience function can be used to copy the contents of one attached database into another. The function validates that source and target schema names reference attached databases, but constructed the internal SQL without quoting them. Thus a valid attached database alias containing SQL tokens could alter generated statements. SQLCipher now additionally quotes schema names before they are used in the generated SQL, ensuring they remain pure SQL identifiers. This issue is assigned a CVSS 4.0 base score of 2.1 / Low (CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:N/VI:L/VA:L/SC:N/SI:N/SA:L). In order to practically exploit this issue, an application must already have an existing SQL injection vulnerability or allow unrestricted SQL access that reaches sqlcipher_export with attacker-controlled schema aliases. Cryptographic integrity of the database is unaffected and data remains encrypted under the application-controlled key at all times, all per-page HMAC and underlying integrity protections continue to function, and there is no leakage of data.
  2. SQLCipher allows an undocumented optional hexkey parameter in URI connection strings for providing a hex-encoded key. An issue with parameter handling meant that using a non-empty but syntactically invalid hex value would not raise an error. Opening a new database in this manner would continue without a codec and write a plaintext SQLite database. SQLCipher now reports an error for a hexkey value containing no valid key material. Note that the hexkey URI parameter is not part of our official API documentation or any recommended example code, and is unlikely to be widely used. The same 2.1 / Low vector applies here as well.

Both issues were reported privately by the Wingtecher Team. We sincerely thank them for their responsible and coordinated disclosure.

Cryptographic Provider Matrix

The table below summarizes the cryptographic providers used across SQLCipher packages and platforms:

Edition Platform Cryptographic Provider
Community (non-FIPS) Android based on LibTomCrypt 1.18.2
Community (non-FIPS) Apple Common Crypto (version varies by OS)
Commercial & Enterprise (non-FIPS) Apple Common Crypto (version varies by OS)
Commercial & Enterprise (non-FIPS) Other Platforms OpenSSL 3.5.8 LTS
Enterprise FIPS All Platforms SQLCipher Cryptographic Module
Based on OpenSSL 3.5.7 LTS

Upgrading and Availability

SQLCipher 4.19.0 is available for download now. We recommend that all applications upgrade to incorporate the security fixes and the other improvements in this release. As always, test your applications thoroughly with the new version before deploying to production.

Commercial and Enterprise - On-demand access to new releases of SQLCipher packages are available to all licensees with an active subscription from the Customer Downloads fulfillment site. Subscribers will also receive a separate email notification regarding the update and can contact us at any time for private support directly from the SQLCipher development team. Commercial and Enterprise edition upgrades require a new license code from the SQLCipher fulfillment site for each version. Don’t forget to change the license code in your application(s) when you upgrade.

Community Edition - SQLCipher Community Edition source code is available on GitHub, via AAR packaging for Android, and Swift Package Manager for Apple platforms.

For feedback and questions, please visit our Community Forum or private support channels. Thank you for using SQLCipher!

SQLCipher 4.18.0 Release

2026-08-18 08:00:00 -0400

We’re pleased to announce the immediate availability of SQLCipher 4.18.0. This is intended primarily as a maintenance release focused on dependency updates, cleanup, and bug fixes, along with a few minor improvements. However, it also includes a significant update to SQLCipher for Android which adds support for Room 3.

SQLCipher Changes

  • Updates the upstream SQLite baseline to the latest patch release 3.53.4
  • Avoids allocating memory on Windows during log writes which could cause a crash on Windows under non-default log settings with PRAGMA cipher_memory_security = ON
  • Fixes “relocation truncated to fit” error for optimized GCC builds
  • Adds comments clarifying intent of crypto_openssl.c
  • Other miscellaneous fixes and general improvements

SQLCipher for Android and Room 3 Support

SQLCipher for Android adds support for Room 3 in addition to earlier versions of Room. Alongside that improvement, the compileSdk version is now 37.

Cryptographic Provider Matrix

The table below summarizes the cryptographic providers used across SQLCipher packages and platforms:

Edition Platform Cryptographic Provider
Community (non-FIPS) Android based on LibTomCrypt 1.18.2
Community (non-FIPS) Apple Common Crypto (version varies by OS)
Commercial & Enterprise (non-FIPS) Apple Common Crypto (version varies by OS)
Commercial & Enterprise (non-FIPS) Other Platforms OpenSSL 3.5.7 LTS
Enterprise FIPS All Platforms SQLCipher Cryptographic Module
Based on OpenSSL 3.5.7 LTS

Upgrading and Availability

SQLCipher 4.18.0 is available for download now, and we recommend upgrading to incorporate these improvements. As always, test your applications thoroughly with the new version before deploying to production.

Commercial and Enterprise - On-demand access to new releases of SQLCipher packages are available to all licensees with an active subscription from the Customer Downloads fulfillment site. Subscribers will also receive a separate email notification regarding the update and can contact us at any time for private support directly from the SQLCipher development team. Commercial and Enterprise edition upgrades require a new license code from the SQLCipher fulfillment site for each version. Don’t forget to change the license code in your application(s) when you upgrade.

Community Edition - SQLCipher Community Edition source code is available on GitHub, via AAR packaging for Android, and Swift Package Manager for Apple platforms.

For feedback and questions, please visit our Community Forum or private support channels. Thank you for using SQLCipher!

SQLCipher 4.17.0 Release

2026-07-08 08:00:00 -0400

We’re pleased to announce the immediate availability of SQLCipher 4.17.0. This is intended primarily as a maintenance release focused on dependency updates, cleanup, and bug fixes, along with a few minor improvements. However, it also updates the SQLite baseline to incorporate fixes for upstream CVEs that affected earlier versions.

SQLCipher Changes

  • Updates the upstream SQLite baseline to the latest patch release 3.53.3
  • Normalizes error reporting so an incorrect key always returns SQLITE_NOTADB, even when the first operation modifies the schema
  • Improves error handling and fixes CSPRNG reinitialization in the LibTomCrypt cryptographic provider
  • Improves thread safety for debug memory counters and xoshiro PRNG state to avoid spurious Thread Sanitizer warnings
  • Adds an optional SQLCIPHER_OMIT_MALLOC build macro to aid analysis under Address Sanitizer
  • Several miscellaneous fixes and general improvements

SQLCipher Commercial and Enterprise packages include the following changes:

  • Updates OpenSSL-based cryptographic providers to 3.5.7 LTS
  • Updates SQLCipher for .NET (SDS) to track the latest System.Data.SQLite upstream release (2.0.3)
  • Updates SQLCipher for JDBC to track the latest upstream sqlite-jdbc release (3.53.2.0)
  • Raises the minimum macOS deployment target to 10.10 for the JDBC driver on macOS
  • Raises the minimum macOS deployment target to 10.13 for non-JDBC macOS-specific libraries

Upstream SQLite CVEs

The new SQLite 3.53.3 baseline fixes two memory corruption issues in the FTS5 full-text search extension, CVE-2026-11822 and CVE-2026-11824. These can be triggered by a FTS5 query running against a database that contains specially attacker-crafted data. They also require the application to have disabled defensive mode (SQLITE_DBCONFIG_DEFENSIVE). Further details are available on the SQLite CVE list.

For SQLCipher users, the practical risk of these CVEs is low. Because SQLCipher databases are encrypted, an attacker can’t construct malicious database contents needed to trigger these issues without knowing the database key. Therefore, applications that maintain strong key controls and work with their own encrypted databases (i.e. not ones supplied by third parties) have very little exposure. However, we still recommend upgrading to address these fixes, especially for applications that could possibly open databases from untrusted sources.

Cryptographic Provider Matrix

The table below summarizes the cryptographic providers used across SQLCipher packages and platforms:

Edition Platform Cryptographic Provider
Community (non-FIPS) Android based on LibTomCrypt 1.18.2
Community (non-FIPS) Apple Common Crypto (version varies by OS)
Commercial & Enterprise (non-FIPS) Apple Common Crypto (version varies by OS)
Commercial & Enterprise (non-FIPS) Other Platforms OpenSSL 3.5.7 LTS
Enterprise FIPS All Platforms SQLCipher Cryptographic Module
Based on OpenSSL 3.5.7 LTS

Upgrading and Availability

SQLCipher 4.17.0 is available for download now, and we recommend upgrading to incorporate these improvements. As always, test your applications thoroughly with the new version before deploying to production.

Commercial and Enterprise - On-demand access to new releases of SQLCipher packages are available to all licensees with an active subscription from the Customer Downloads fulfillment site. Subscribers will also receive a separate email notification regarding the update and can contact us at any time for private support directly from the SQLCipher development team. Commercial and Enterprise edition upgrades require a new license code from the SQLCipher fulfillment site for each version. Don’t forget to change the license code in your application(s) when you upgrade.

Community Edition - SQLCipher Community Edition source code is available on GitHub, via AAR packaging for Android, and Swift Package Manager for Apple platforms.

For feedback and questions, please visit our Community Forum or private support channels. Thank you for using SQLCipher!

SQLCipher 4.16.0 Release

2026-05-12 08:00:00 -0400

We’re pleased to announce the immediate availability of SQLCipher 4.16.0. This release updates the SQLite baseline and includes several other improvements.

SQLCipher Core

  • Updates the upstream SQLite baseline to the latest patch release 3.53.1
  • Fixes an allocation issue that could cause an increase in mlock warning messages (most frequently on Android)
  • Removes redundant logging of mlock and VirtualLock failures at WARN level

SQLCipher Commercial & Enterprise

  • Fixes issue with the license authorizer which could fail for certain operations even with a valid code
  • Restores Mac Catalyst dynamic libraries in the SQLCipher for macOS .NET NuGet package
  • Updates SQLCipher Enterprise FIPS iOS packages to corrected framework headers (no functional impact or version change)
  • Updates SQLCipher for JDBC to track the latest upstream release (3.53.1.0)
  • Updates SQLitePCLRaw dependencies to 3.0.3 for .NET packages

Cryptographic Provider Matrix

The table below summarizes the cryptographic providers used across SQLCipher packages and platforms:

Edition Platform Cryptographic Provider
Community (non-FIPS) Android based on LibTomCrypt 1.18.2
Community (non-FIPS) Apple Common Crypto (version varies by OS)
Commercial & Enterprise (non-FIPS) Apple Common Crypto (version varies by OS)
Commercial & Enterprise (non-FIPS) Other Platforms OpenSSL 3.5.6 LTS
Enterprise FIPS All Platforms SQLCipher Cryptographic Module
Based on OpenSSL 3.5.6 LTS

Upgrading and Availability

SQLCipher 4.16.0 is available for download now, and we recommend upgrading to incorporate these improvements. As always, test your applications thoroughly with the new version before deploying to production.

Commercial and Enterprise - On-demand access to new releases of SQLCipher packages are available to all licensees with an active subscription from the Customer Downloads fulfillment site. Subscribers will also receive a separate email notification regarding the update and can contact us at any time for private support directly from the SQLCipher development team. Commercial and Enterprise edition upgrades require a new license code from the SQLCipher fulfillment site for each version. Don’t forget to change the license code in your application(s) when you upgrade.

Community Edition - SQLCipher Community Edition source code is available on GitHub, via AAR packaging for Android, and Swift Package Manager for Apple platforms.

For feedback and questions, please visit our Community Forum or private support channels. Thank you for using SQLCipher!