GHSA-5qw5-wf2q-f538 ActiveRecord-JDBC-Adapter (AR-JDBC) lib/arjdbc/jdbc/adapter.rb sql.gsub() Function SQL Injection

Not scored Published

Remote attackers can inject SQL via unsanitized input in the ActiveRecord-JDBC-Adapter, leading to data manipulation or disclosure.

Exploited in the wild
Not known
Login needed
Not stated
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is GHSA-5qw5-wf2q-f538?

GHSA-5qw5-wf2q-f538 is a SQL injection vulnerability in activerecord-jdbc-adapter, published on 16 Jan 2026. It can be exploited over the network, with no action from the victim.

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

Which versions are affected by GHSA-5qw5-wf2q-f538?

2 open source packages ship an affected version, including activerecord-jdbc-adapter.

PackageAffectedFixed in
activerecord-jdbc-adapter RubyGemsAll versions1.2.8
activerecord-jdbc-adapter RubyGemsAll versions1.2.8

How do I fix GHSA-5qw5-wf2q-f538?

Upgrade activerecord-jdbc-adapter to 1.2.8 or later.

Use parameterised queries everywhere and never build SQL by joining strings. Upgrade affected software first; a web application firewall only buys time. More about SQL injection.

Is GHSA-5qw5-wf2q-f538 being exploited?

There is no known exploitation of GHSA-5qw5-wf2q-f538 in the wild and no public exploit code.

Sources

Is GHSA-5qw5-wf2q-f538 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free