A use-after-free vulnerability exists in the sqlite3-ruby gem when defining aggregate functions with two or more arguments evaluated over TEXT or BLOB columns. This can cause the Ruby objects holding arguments to be freed prematurely during garbage collection, leading to incorrect objects being passed to the aggregate's step method or a process crash. The vulnerability affects Mailcatcher versions from 0.8.1 up to but not including 0.11.0. The maintainers rate this as medium severity with a CVSS 4.0 score of 6.3. The issue is fixed in sqlite3 gem version 2.9.6 or later.