Repository navigation
chore(deps): update dependency sqlite3 to v2 [security] - #67
Open
renovate[bot] wants to merge 1 commit into
Open
renovate[bot] wants to merge 1 commit into
renovate[bot] wants to merge 1 commit into
Conversation
renovate
Bot
force-pushed
the
renovate/rubygems-sqlite3-vulnerability
branch
from
August 11, 2026 23:40
d2d4ff2 to
e44c8c2
Compare
renovate
Bot
force-pushed
the
renovate/rubygems-sqlite3-vulnerability
branch
from
August 26, 2026 15:02
e44c8c2 to
0d61a49
Compare
renovate
Bot
force-pushed
the
renovate/rubygems-sqlite3-vulnerability
branch
from
October 26, 2026 23:11
0d61a49 to
5a5d95e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
"~> 1.4"→"~> 2.0"sqlite3-ruby has Use-After-Free When Redefining SQLite Functions with Different Arity
CVE-2026-54619 / GHSA-28hh-pr2h-2w89
More information
Details
Summary
Using
Database#create_functionorDatabase#define_functionto define the same function name more than once with different numbers of arguments ("arity") or text encodings will result in a invalid memory read and a segmentation fault.Mitigation
Upgrade to sqlite3 gem v2.9.5 or later.
As a workaround, avoid defining multiple custom functions with the same name (varying numbers of arguments or encoding).
Severity
The sqlite3-ruby maintainers assess this as Low severity. It is reliably triggered after GC when code is structured in a particular way. There is no known general exploit that could be used as a denial of service attack.
Severity
CVSS:4.0/AV:L/AC:H/AT:N/PR:L/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
Release Notes
sparklemotion/sqlite3-ruby (sqlite3)
v2.9.5Compare Source
Dependencies
Security / Stability
v2.9.4Compare Source
v2.9.3Compare Source
v2.9.2Compare Source
v2.9.1Compare Source
v2.9.0Compare Source
Ruby
Added
Statement#named_paramsto introspect on a parameterized SQL statement. #627 #642 @captn3m0Improved
v2.8.1Compare Source
v2.8.0Compare Source
v2.7.4Compare Source
v2.7.3Compare Source
v2.7.2Compare Source
v2.7.1Compare Source
v2.7.0Compare Source
v2.6.0Compare Source
Dependencies
Important note for Window users
Loading extensions is not available on Windows when using the precompiled native gems or compiling the vendored sqlite library from source, starting with sqlite3-ruby v2.6.0.
Sqlite 3.48.0 and later have dramatically changed the "autoconf amalgamation" that is vendored in this gem. Specifically, the configuration is no longer actually autoconf, but some scripts that emulate autoconf's interface and behavior.
Although this mostly "just worked", we're having a problem resolving the libraries necessary for loading extensions. As a result, starting with sqlite3-ruby v2.6.0, extensions cannot be loaded on Windows when using precompiled native gems or when compiling the vendored sqlite library.
If you are willing and able to help fix this, let us know at #618.
v2.5.0Compare Source
Ruby
This release introduces native gem packages that include Ruby 3.4.
v2.4.1Compare Source
Dependencies
Vendored sqlite is updated to v3.47.2 #593 @flavorjones
The description from the upstream maintainers is:
Saving you a click, you should upgrade if you're running sqlite3-ruby v2.1.1 or later.
Fixed
ForkSafetymodule when GC runs during the "after fork" hook. #592 @flavorjonesv2.4.0Compare Source
Added
Database#load_extensionnow accepts any object that responds to#to_path, in addition to String filesystem paths. [#586] @flavorjonesDatabase.newnow accepts anextensions:parameter, which is an array of SQLite extensions that will be loaded during initialization. The array may contain String filesystem paths and objects that respond to#to_path. [#586] @flavorjonesv2.3.1Compare Source
Dependencies
v2.3.0Compare Source
Added
Database#optimizewhich wraps thepragma optimize;statement. Also addedConstants::Optimizeto allow advanced users to pass a bitmask of options. See https://www.sqlite.org/pragma.html#pragma_optimize. [#572] @alexcwatt @flavorjonesSQLite3::VERSION_INFOis contains a bag of metadata about the gem and the sqlite library used.SQLite3::SQLITE_PACKAGED_LIBRARIESandSQLite3::SQLITE_PRECOMPILED_LIBRARIESare indicate how the gem was built. [#581] @flavorjonesFixed
Database#encoding=support for switching the database encoding toUTF-16BE, which has been broken sinceDatabase#encoding=was introduced in v1.3.12 in 2016. [#575] @miyucypkg-configgem when failing to build from source, since it is not used. [#358] @flavorjonesv2.2.0Compare Source
Added
Improved
Database#preparewill raise a verbose exception with a multiline message indicating with a "^" exactly where in the statement the error occurred. [#554] @fractaledmind @flavorjonesv2.1.1Compare Source
Dependencies
Vendored sqlite is updated to v3.47.2 #593 @flavorjones
The description from the upstream maintainers is:
Saving you a click, you should upgrade if you're running sqlite3-ruby v2.1.1 or later.
Fixed
ForkSafetymodule when GC runs during the "after fork" hook. #592 @flavorjonesv2.1.0Compare Source
Ruby
Fork safety improvements
Sqlite itself is not fork-safe. Specifically, writing in a child process to a database connection that was created in the parent process may corrupt the database file. To mitigate this risk, sqlite3-ruby has implemented the following changes:
fork()will immediately be closed in the child process to mitigate the risk of corrupting the database file.If it's at all possible, we strongly recommend that you close writable database connections in the parent before forking. If absolutely necessary (and you know what you're doing), you may suppress the fork safety warnings by calling
SQLite3::ForkSafety.suppress_warnings!.See the README's "Fork Safety" section and
adr/2024-09-fork-safety.mdfor more information. [#558, #565, #566] @flavorjonesImproved
sqlite3_close_v2to close databases in a deferred manner if there are unclosed prepared statements. Previously closing a database while statements were open resulted in aBusyException. See https://www.sqlite.org/c3ref/close.html for more context. [#557] @flavorjonesbusy_handler, fire the write barrier to prevent potential crashes during the GC mark phase. [#556] @jhawthornDocumentation
FAQ.mdhas been updated to fix some inaccuracies. [#562] @rickhullv2.0.4Compare Source
Dependencies
v2.0.3Compare Source
Improved
Database#quoteavoids allocating strings where reusing frozen strings is preferable. #548 @casperisfinev2.0.2Compare Source
Dependencies
v2.0.1Compare Source
Fixed
ArgumentErrorifDatabase#execute,#execute_batch, or#queryare passed multiple bind parameters that are not in an Array. In v2.0.0 these methods would silently swallow additional arguments, and this change makes the failure explicit. See the CHANGELOG notes for v2.0.0 for examples on how to update your code. [#527] @flavorjonesDatabase#execute_batchto raise an encoding exception when passed some non-ascii strings. As a result of this fix,Database#preparenow ensures the "remainder" string will always be encoded as UTF-8. [#524] @flavorjonesv2.0.0Compare Source
This is a major release which contains some breaking changes, primarily the removal of
long-deprecated functionality. Before upgrading, please make sure to address deprecation warnings
emitted from your application using sqlite3-ruby v1.7.x.
Ruby
Packaging
Native (precompiled) gems are now available for Linux Musl. [#442] @flavorjones
Here are the platforms for which native gems are shipped:
aarch64-linux-gnu(requires: glibc >= 2.29)aarch64-linux-muslarm-linux-gnu(requires: glibc >= 2.29)arm-linux-muslarm64-darwinx64-mingw32/x64-mingw-ucrtx86-linux-gnu(requires: glibc >= 2.17)x86-linux-muslx86_64-darwinx86_64-linux-gnu(requires: glibc >= 2.17)x86_64-linux-musl⚠ Ruby 3.0 linux users must use Rubygems >= 3.3.22 in order to use these gems.
⚠ Musl linux users should update to Bundler >= 2.5.6 to avoid rubygems/rubygems#7432
See the INSTALLATION doc for more information.
Dependencies
Added
Database#busy_handler_timeout=introduced as an alternative to#busy_timeout=that can be used when it's desired to release the GVL between retries. [#443, #456] @fractaledmindSUPER_JOURNALflag which is an alias forMASTER_JOURNALas of sqlite 3.33.0. [#467] @flavorjonesStatement#statandStatement#memusedintroduced to report statistics. [#461] @fractaledmindStatement#sqlandStatement#expanded_sqlintroduced to retrieve the SQL statement associated with theStatementobject. [#293, #498] @tenderloveSQLite3.statusintroduced to return run-time status and reset high-water marks. SeeSQLite3::Constants::Statusfor details. [#520] @wjlroeImproved
ResultSethashes. [#154, #484, #468] @tenderlovebusy_handler. [#466] @byrootResultSetinstance variable. [#469] @tenderloveChanged
SQLite3::Exceptionor subclasses. Previously somePragmasmethods raisedException, andDatabase#execute_batch2andDatabase#load_extensionraisedRuntimeError. [#467, #490] @flavorjonesDatabase#columnsreturns a list of internal frozen strings. [#155, #474, #486] @tenderloveDatabase#transactionreturns the result of the block when used with a block. [#508] @alexcwattDatabase#execute_batchreturns the result of the last statement executed. [#512] @alexcwattRemoved
Removed class
SQLite3::Translatorand all related type translation methods which have been deprecated since v1.3.2. [#470] @tenderloveIf you need to do type translation on values returned from the statement object, please wrap it
with a delegate object. Here is an example of using a delegate class to implement type
translation:
Removed
typesandfieldsreaders on row objects, which have been deprecated sincev1.3.6. [#471] @tenderlove
Deprecated code looks like this:
If you would like to access the "types" associated with a returned query,
use a prepared statement like this:
Removed support for non-Array bind parameters to methods
Database#execute,#execute_batch, and#query, which has been deprecated since v1.3.0. [#511] @flavorjonesDeprecated code looks like this:
For these cases, pass the bind parameters as an array:
Removed class
SQLite3::VersionProxywhich has been deprecated since v1.3.2. [#453] @flavorjonesRemoved methods
SQLite3::Database::FunctionProxy#countand#set_errorwhich have been broken since at least v1.3.13. [#164, #509, #510] @alexcwatt @flavorjonesConfiguration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.