Live threats

All CVEs / Activerecord Project

CVE-2023-22794Activerecord Project Activerecord

High 8.8

Priority
53
CVSS 3.1
8.8
EPSS
2.0%
probability of exploitation in 30 days · percentile 82
Auth required
Yes
Published
Feb 9, 2023
Updated
Oct 23, 2026
Category
Application · Cross-platform
Weakness (CWE)
CWE-89
Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

What happens

A vulnerability in ActiveRecord <6.0.6.1, v6.1.7.1 and v7.0.4.1 related to the sanitization of comments. If malicious user input is passed to either the `annotate` query method, the `optimizer_hints` query method, or through the QueryLogs interface which automatically adds annotations, it may be sent to the database withinsufficient sanitization and be able to inject SQL outside of the comment.

Original NVD text.

What to do

  1. Apply the vendor's security update for Activerecord.

Affected packages

EcosystemPackageAffected versionsFixed inHow to upgrade
RubyGems activerecord ≥ 6.0.0 < 6.0.6.1 6.0.6.1 gem "activerecord", ">= 6.0.6.1"
RubyGems activerecord ≥ 6.1.0 < 6.1.7.1 6.1.7.1 gem "activerecord", ">= 6.1.7.1"
RubyGems activerecord ≥ 7.0.0 < 7.0.4.1 7.0.4.1 gem "activerecord", ">= 7.0.4.1"

Per OSV / GitHub Advisories (GHSA-hq7p-j377-6v63). Check the version in your lockfile before upgrading.

Affected products (CPE)

VendorProductVersions
activerecord_projectactiverecord≥ 6.0.0 < 6.0.6.1
activerecord_projectactiverecord≥ 6.1.0 < 6.1.7.1
activerecord_projectactiverecord≥ 7.0.0 < 7.0.4.1

Official advisories

Vendor, CERT and distribution advisories that name this CVE. Original titles.

Official sources

References

Links published by the sources. Open them with care.