GHSA-5qw5-wf2q-f538 — Vulnerability in activerecord-jdbc-adapter
ActiveRecord-JDBC-Adapter (AR-JDBC) lib/arjdbc/jdbc/adapter.rb sql.gsub() Function SQL Injection
Does your project use an affected activerecord-jdbc-adapter version?
Paste your Gemfile.lock to check it for GHSA-5qw5-wf2q-f538 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.
Summary
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.
Advisory Timeline
- First published January 16, 2026 (314 days ago).
- Last revised February 3, 2026 — 17 days after initial publication.
Remediation
Upgrade to the fixed version using your package manager.
gem install activerecord-jdbc-adapter -v 1.2.8
After upgrading, scan your dependencies again to confirm the vulnerability is resolved.
Affected Packages (1)
Affects 1 ecosystem: RubyGems (1).
| Package | Fixed In |
|---|---|
| activerecord-jdbc-adapter RubyGems · Affected: 0.6, 0.7, 0.7.1, 0.7.2 (+27 more) | 1.2.8 |
Vulnerability Classification
Common Weakness Enumeration (CWE) identifiers for this vulnerability type.
- CWE-89SQL InjectionMITRE
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 9.1 score means for each attack dimension.
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
References
- https://github.com/jruby/activerecord-jdbc-adapter/issues/322WEB
- https://github.com/jruby/activerecord-jdbc-adapterPACKAGE
- https://github.com/jruby/activerecord-jdbc-adapter/blob/master/lib/arjdbc/jdbc/adapter.rbWEB
- https://github.com/rubysec/ruby-advisory-db/blob/master/gems/activerecord-jdbc-adapter/GHSA-5qw5-wf2q-f538.ymlWEB
- https://github.com/rubysec/ruby-advisory-db/blob/master/gems/activerecord-jdbc-adapter/OSVDB-114854.ymlWEB
Frequently Asked Questions
- What is GHSA-5qw5-wf2q-f538?
- ActiveRecord-JDBC-Adapter (AR-JDBC) lib/arjdbc/jdbc/adapter.rb sql.gsub() Function SQL Injection. This vulnerability has been assigned a severity rating of HIGH (CVSS score: 9.1/10).
- How do I check if my project is affected by GHSA-5qw5-wf2q-f538?
- GHSA-5qw5-wf2q-f538 affects activerecord-jdbc-adapter. Use GeekWala's free vulnerability scanner to check your dependencies against GHSA-5qw5-wf2q-f538 and 200,000+ other known vulnerabilities.
Severity & Exploitability
Maximum impact if exploited, often with little effort or access required.
Related CVEs
- CVE-2026-126366HIGH
msgpack-ruby JRuby decoder makes uncapped header-count allocations; a 5-byte message forces multi-GiB OOM
- CVE-2026-126081HIGH
Action Pack: Possible Strong Parameters Bypass in Parameters#each_key