CVE-2023-22794

Exp

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.

Published: 2023-02-09 Last update: 2024-11-21 Assigner: [email protected] Source: [email protected]

Conclusion & alert: CVE-2023-22794 is rated High Exploit Risk (81/100): CVSS High severity, with high exploitation likelihood (EPSS 5.76%, 90th percentile). Core evidence: 1 public exploit reference(s) are indexed (Exploit-DB). Mandatory action: Public exploits are available—assess exposure, apply mitigations, and prioritize patching.

Risk is dynamic; we continuously reassess and refresh what is shown on this page as upstream context changes.

Public exploit references (Exploit-DB) for CVE-2023-22794

EDB-ID Source Kind Published Link
nvd_ref exploit_tag Exploit-DB ↗

Exploit prediction scoring system (EPSS) score for CVE-2023-22794

EPSS lead: Daily EPSS estimates relative likelihood of exploitation; percentile ranks this CVE among scored vulnerabilities (higher = more severe relative rank).

# Date Old EPSS score New EPSS score Delta (New - Old)
1 2026-04-21 6.66% 5.76% -0.90%
2 2026-03-14 6.87% 6.66% -0.21%
3 2026-03-04 6.87%

Full EPSS history (46 records total)

Common vulnerability scoring system (CVSS) metrics for CVE-2023-22794

CVSS metrics for this CVE.

Base score Version Severity Vector Exploitability Impact Score source
8.8 3.1 HIGH
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H Click to expand
Attack vector (AV:N)
Could be attacked over the internet or any normal routed network—not just someone sitting at the machine.
Attack complexity (AC:L)
Once they can reach the bug, pulling it off is straightforward—no weird race conditions or rare setup.
Privileges required (PR:L)
A normal user session is enough; they don’t have to be admin.
User interaction (UI:N)
Nobody has to click “OK” or open a trap file; it can work without a victim helping.
Scope (S:U)
Damage stays in the same “trust bubble” as the broken component—no big spill into unrelated systems.
Confidentiality (C:H)
Serious risk that confidential data gets exposed in a big way.
Integrity (I:H)
They could widely tamper with or forge data—trust in the data is badly hurt.
Availability (A:H)
Could take the service down hard or make it unusable for people who depend on it.
2.8 5.9 [email protected]

Weakness enumeration for CVE-2023-22794

GitHub Security Advisory for CVE-2023-22794

GHSA-hq7p-j377-6v63 · Severity: high · Ecosystem: rubygems — SQL Injection Vulnerability via ActiveRecord comments

OS Trackers for CVE-2023-22794

vendor priority summary link
debian not yet assigned CVE-2023-22794 not yet assigned priority: Debian including 1 source packages (rails), 5 status rows across 5 suites (bookworm, bullseye, forky, sid, trixie): resolved 5. https://security-tracker.debian.org/tracker/CVE-2023-22794
redhat high https://access.redhat.com/security/cve/CVE-2023-22794
ubuntu medium CVE-2023-22794 medium priority: Ubuntu including 7 source packages (rails, rails-4.0, …), 55 status rows across 13 suites (bionic, focal, jammy, kinetic, lunar, mantic, noble, oracular, plucky, questing, trusty, upstream, xenial): DNE 30, needs-triage 13, ignored 12. https://ubuntu.com/security/CVE-2023-22794

Affected software / configurations for CVE-2023-22794

Vendor Product Version Raw CPE
activerecord_project activerecord >= 6.0.0, < 6.0.6.1 cpe:2.3:a:activerecord_project:activerecord:*:*:*:*:*:ruby:*:*
activerecord_project activerecord >= 6.1.0, < 6.1.7.1 cpe:2.3:a:activerecord_project:activerecord:*:*:*:*:*:ruby:*:*
activerecord_project activerecord >= 7.0.0, < 7.0.4.1 cpe:2.3:a:activerecord_project:activerecord:*:*:*:*:*:ruby:*:*

References for CVE-2023-22794

cvelogic Threat Intelligence