{"id":"GHSA-5qw5-wf2q-f538","summary":"ActiveRecord-JDBC-Adapter (AR-JDBC) lib/arjdbc/jdbc/adapter.rb sql.gsub() Function SQL Injection","details":"ActiveRecord-JDBC-Adapter (AR-JDBC) contains a flaw that may allow carrying out an SQL injection attack. The issue is due to the sql.gsub() function in lib/arjdbc/jdbc/adapter.rb not properly sanitizing user-supplied input before using it in SQL queries. This may allow a remote attacker to inject or manipulate SQL queries in the back-end database, allowing for the manipulation or disclosure of arbitrary data.","modified":"2026-02-03T03:11:34.559768Z","published":"2026-01-16T19:20:40Z","database_specific":{"github_reviewed_at":"2026-01-16T19:20:40Z","github_reviewed":true,"severity":"HIGH","cwe_ids":["CWE-89"],"nvd_published_at":null},"references":[{"type":"WEB","url":"https://github.com/jruby/activerecord-jdbc-adapter/issues/322"},{"type":"PACKAGE","url":"https://github.com/jruby/activerecord-jdbc-adapter"},{"type":"WEB","url":"https://github.com/jruby/activerecord-jdbc-adapter/blob/master/lib/arjdbc/jdbc/adapter.rb"},{"type":"WEB","url":"https://github.com/rubysec/ruby-advisory-db/blob/master/gems/activerecord-jdbc-adapter/GHSA-5qw5-wf2q-f538.yml"},{"type":"WEB","url":"https://github.com/rubysec/ruby-advisory-db/blob/master/gems/activerecord-jdbc-adapter/OSVDB-114854.yml"}],"affected":[{"package":{"name":"activerecord-jdbc-adapter","ecosystem":"RubyGems","purl":"pkg:gem/activerecord-jdbc-adapter"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.2.8"}]}],"versions":["0.6","0.7","0.7.1","0.7.2","0.8","0.8.1","0.8.2","0.9","0.9.0.1","0.9.1","0.9.2","0.9.3","0.9.4","0.9.5","0.9.6","0.9.7","1.0.0","1.0.0.beta1","1.0.0.beta2","1.0.1","1.0.2","1.0.3","1.1.0","1.1.1","1.1.2","1.1.3","1.2.0","1.2.1","1.2.2","1.2.2.1","1.2.5"],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/01/GHSA-5qw5-wf2q-f538/GHSA-5qw5-wf2q-f538.json"}}],"schema_version":"1.7.3","severity":[{"type":"CVSS_V4","score":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N/E:P"}]}