CVE-2023-22794: activerecord_project activerecord
Vulnerability summary
CVE-2023-22794 is a high (CVSS 8.8) vulnerability in activerecord_project activerecord. EPSS estimates a 2.15% chance of exploitation in the next 30 days, higher than 82.1% of scored vulnerabilities. 1 public exploit is recorded.
Public exploit (reference, Date unknown)
Source freshness unavailable
How is this decided?Advisory lineage
Upstream 0 · Downstream 5 · Related 3Timeline
- 09-02-2023PublishedVulnerability first disclosed.
- 02-08-2024Last modifiedVulnerability information updated.
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.
CVSS metrics
4 scores · 4 sources · 1 version- OSV · UbuntuEcosystem advisory · calculated8.8HighCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- OSV · DebianEcosystem advisory · calculated8.8HighCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- OSV · RubygemsEcosystem advisory · calculated8.8HighCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
EPSS trend
Probability
2.15%
Chance of exploitation in the next 30 days
Percentile
82%
Versus all other CVEs
30-day change
No change 0.00 pp
From 2.15% on 04-10-2026
Known exploited
Compare KEV catalogsNot in the CISA KEV catalog.
Not in the ENISA CNW catalog.
Not in the CIRCL catalog.
Public exploits
1 foundExploit Reference (discuss.rubyonrails.org)
Maturity: unknown
Weaknesses
CWE · root causeAffected systems
Known conditions: network-reachable, low-privilege account, no user interaction (CVSS vector). Other conditions: not stated in public data.
Activerecord_project1 product
- activerecord≥ 6.0.0, < 6.0.6.1 | ≥ 6.1.0, < 6.1.7.1 | ≥ 7.0.0, < 7.0.4.1
Debian1 product
- rails< 2:6.1.7.3+dfsg-1
RubyGems1 product
- activerecord≥ 6.0.0, < 6.0.6.1 | ≥ 6.1.0, < 6.1.7.1 | ≥ 7.0.0, < 7.0.4.1
Ubuntu1 product
- railsAll versions (No fix recorded)
4 vendors · 4 products
References
13 links- discuss.rubyonrails.org/t/cve-2023-22794-sql-injection-vulnerability-via-activerecord-comments/82117REPORTWEBExploitPatchVendor Advisory
- github.com/rails/railsPACKAGE