ActiveRecord-JDBC-Adapter (AR-JDBC) lib/arjdbc/jdbc/adapter.rb sql.gsub() Function SQL Injection
Key facts
- Attack vector
- —
- Privileges required
- —
- User interaction
- —
- Attack complexity
- —
- Impact type
- SQL injection
- Confidentiality · integrity · availability
- —
- Fix status
- Fixed
No CVSS vector from any source. Fix status from GitHub. Impact type from CWE-89.
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.
Why it matters now
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| — | activerecord-jdbc-adapter (RubyGems) | before 1.2.8 | 1.2.8 | Patch available | GHSA-5qw5-wf2q-f538 |
- activerecord-jdbc-adapter (RubyGems) Vendor— Affected before 1.2.8 Fixed in 1.2.8 Patch available GHSA-5qw5-wf2q-f538
Remediation
- Fix · GHSA-5qw5-wf2q-f538 activerecord-jdbc-adapter (RubyGems) Fixed in 1.2.8 Advisory →
Timeline
- 2026-10-03 Threatist record created from GHSA-5qw5-wf2q-f538
References
Other 5
- https://github.com/jruby/activerecord-jdbc-adapter/issues/322
- https://github.com/jruby/activerecord-jdbc-adapter
- https://github.com/jruby/activerecord-jdbc-adapter/blob/master/lib/arjdbc/jdbc/adapter.rb
- https://github.com/rubysec/ruby-advisory-db/blob/master/gems/activerecord-jdbc-adapter/GHSA-5qw5-wf2q-f538.yml
- https://github.com/rubysec/ruby-advisory-db/blob/master/gems/activerecord-jdbc-adapter/OSVDB-114854.yml
Sources
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences