CVE-2023-22794

HIGH
8.8
CVSS Score
Published: February 9, 2023 at 12:00 AM UTC
Updated: October 23, 2026 at 11:10 PM UTC
2 products affected across 2 vendorsActiverecordRails

Using https://github.com/rails/rails by N/A?

Get instant alerts when new vulnerabilities affect https://github.com/rails/rails - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
HIGH8.8
Exploit prediction
EPSS 2%

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.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

6.0.0 ≤ v < 6.0.6.16.1.0 ≤ v < 6.1.7.17.0.0 ≤ v < 7.0.4.1
Affected range stops below 6.0.6.1, so it looks safe — our inference, not a vendor statement
Affected range stops below 6.1.7.1, so it looks safe — our inference, not a vendor statement
Affected range stops below 7.0.4.1, so it looks safe — our inference, not a vendor statement

Remediation

No guide yet

No remediation guidance has been written for this CVE yet. What the record does show:

CVSS

Attack Vector
NETWORK
Complexity
LOW
Privileges
LOW
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
HIGH
Integrity
HIGH
Availability
HIGH
Vector?

Quick Info

StatusMODIFIED
CWE
CWE-89

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card