Skip to main content

GHSA-5qw5-wf2q-f538 — Vulnerability in activerecord-jdbc-adapter

HIGH

ActiveRecord-JDBC-Adapter (AR-JDBC) lib/arjdbc/jdbc/adapter.rb sql.gsub() Function SQL Injection

Published January 16, 2026Updated February 3, 2026Source: OSV

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.

Check my Gemfile.lock

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.

Bundler
Update activerecord-jdbc-adapter to 1.2.8 or later
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).

PackageFixed 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.

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 9.1 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
—
Confidentiality
—
Integrity
—
Availability
—

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

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

CVSS Score
9.1

Maximum impact if exploited, often with little effort or access required.

Related CVEs

  • CVE-2026-126366
    HIGH

    msgpack-ruby JRuby decoder makes uncapped header-count allocations; a 5-byte message forces multi-GiB OOM

  • CVE-2026-126081
    HIGH

    Action Pack: Possible Strong Parameters Bypass in Parameters#each_key

Check your own dependencies

Free, with no signup for up to 10 packages.

Check my Gemfile.lock