Skip to main content
HIGH

CVE-2023-22794

CVSS v3

8.8

HIGH

EPSS Score

2.2 %

exploit probability, as of 2026-10-20

CISA KEV

No

known exploited

Exploitation

—

SSVC status

Get an alert for each new CVE published for activerecord.

Set up CVE WatchFree account · no credit card

Affected and fixed versions

Packages from OSV.dev and products from the vendors' CSAF advisories.

version not verifiedVersions not verified: read as OSV.dev and the vendors publish them, not checked against each vendor's release list.

Packages

  • activerecordRubyGemsfrom 7.0.0 · fixed in 7.0.4.1

Vendor advisories

  • CVE-2023-22794 Red Hat Product Security2 products fixed

    rubygem-activerecord: SQL Injection

  • RHSA-2023:6818 Red Hat Product Security2 products fixed

    Red Hat Security Advisory: Satellite 6.14 security and bug fix update

Full record on NVD

Description

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.

Technical details

Published
2023-02-09

Frequently asked questions

What is CVE-2023-22794?

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.

Is CVE-2023-22794 actively exploited?

Active exploitation of CVE-2023-22794 has not been confirmed. Its EPSS score was 2.2% on 2026-10-20, the estimated probability of exploitation in the next 30 days.

What is the CVSS score for CVE-2023-22794?

CVE-2023-22794 has a CVSS v3 base score of 8.8 (HIGH severity).

Running activerecord? Hear about its next vulnerability

CVE Watch matches each new CVE to the vendors and products you list (vendor and product, not the version) and puts it in your alerts with its KEV and EPSS status.

Already have an account? Open CVE WatchNo credit card required · No monthly cap on website lookups · 250 API requests/month