{"id":"GHSA-5qw5-wf2q-f538","aliases":[],"status":"published","title":"ActiveRecord-JDBC-Adapter (AR-JDBC) lib/arjdbc/jdbc/adapter.rb sql.gsub() Function SQL Injection","description":"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.","severity":{"version":"4.0","score":8.8,"vector":"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","level":"high","from":"ghsa"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-89"],"published":"2026-01-16T19:20:40Z","modified":"2026-02-03T03:11:34Z","fixes":[{"ecosystem":"RubyGems","package":"activerecord-jdbc-adapter","fixed_in":["1.2.8"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"RubyGems","package":"activerecord-jdbc-adapter","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.2.8"}]}]},{"source":"osv","ecosystem":"RubyGems","package":"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"]}],"references":[{"url":"https://github.com/jruby/activerecord-jdbc-adapter/issues/322","tags":["web"]},{"url":"https://github.com/jruby/activerecord-jdbc-adapter/blob/master/lib/arjdbc/jdbc/adapter.rb","tags":["web"]},{"url":"https://github.com/rubysec/ruby-advisory-db/blob/master/gems/activerecord-jdbc-adapter/OSVDB-114854.yml","tags":["web"]},{"url":"https://github.com/rubysec/ruby-advisory-db/blob/master/gems/activerecord-jdbc-adapter/GHSA-5qw5-wf2q-f538.yml","tags":["web"]},{"url":"https://github.com/advisories/GHSA-5qw5-wf2q-f538"},{"url":"https://github.com/jruby/activerecord-jdbc-adapter","tags":["package"]}],"sources":{"ghsa":[{"id":"GHSA-5qw5-wf2q-f538","title":"ActiveRecord-JDBC-Adapter (AR-JDBC) lib/arjdbc/jdbc/adapter.rb sql.gsub() Function SQL Injection","description":"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.","status":"published","published":"2026-01-16T19:20:40Z","modified":"2026-01-21T16:35:38Z","cvss":[{"version":"4.0","score":8.8,"vector":"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","level":"high"}],"cwes":["CWE-89"],"updated_at":"2026-11-02T14:39:18.564331Z"}],"osv":[{"id":"GHSA-5qw5-wf2q-f538","title":"ActiveRecord-JDBC-Adapter (AR-JDBC) lib/arjdbc/jdbc/adapter.rb sql.gsub() Function SQL Injection","description":"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.","status":"published","published":"2026-01-16T19:20:40Z","modified":"2026-02-03T03:11:34.559768Z","cvss":[{"version":"4.0","score":8.8,"vector":"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","level":"high"}],"cwes":["CWE-89"],"updated_at":"2026-11-02T15:46:38.553953Z"}]}}
