CVE-2023-22794 SQL Injection Vulnerability via ActiveRecord comments
HighCVSS 8.8
EPSS 2.2%
PoC
- Published
- Updated
- Exploit status
- Proof-of-concept only
- Technology
- UbuntuDebian
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.
Upgrade path
14 packages: 5 fixed, 9 with no fix yet.
| Package | Affected | Fixed in | Status |
|---|---|---|---|
| ubuntu/rails(Ubuntu 22.04) | All versions | No fix listed | No fix yet |
| ubuntu/rails(Ubuntu 24.04) | = 2:6.1.7.3+dfsg-2build1; = 2:6.1.7.3+dfsg-3; All versions | No fix listed | No fix yet |
| ubuntu/rails(Ubuntu 25.10) | = 2:6.1.7.3+dfsg-7; = 2:7.2.2.1+dfsg-7; All versions | No fix listed | No fix yet |
| ubuntu/rails(Ubuntu 26.04) | = 2:7.2.2.1+dfsg-7; = 2:7.2.2.2+dfsg-2; = 2:7.2.3+dfsg-2; All versions | No fix listed | No fix yet |
| ubuntu/rails(Ubuntu 26.10) | = 2:7.2.3+dfsg-2; = 2:7.2.3.2+dfsg-2; All versions | No fix listed | No fix yet |
| ubuntu/rails(Ubuntu Pro 16.04) | = 2:4.1.10-1; = 2:4.2.5-1; = 2:4.2.5.1-1; = 2:4.2.5.2-2 +4 more | No fix listed | No fix yet |
| ubuntu/rails(Ubuntu Pro 18.04) | = 2:4.2.9-2; = 2:4.2.9-4; = 2:4.2.10-0ubuntu4; = 2:4.2.10-0ubuntu4+esm1 +2 more | No fix listed | No fix yet |
| ubuntu/rails(Ubuntu Pro 20.04) | = 2:5.2.2.1+dfsg-1ubuntu1; = 2:5.2.3+dfsg-3; = 2:5.2.3+dfsg-3ubuntu0.1~esm1; All versions | No fix listed | No fix yet |
| ubuntu/rails(Ubuntu Pro 22.04) | = 2:6.0.3.7+dfsg-2; = 2:6.1.4.1+dfsg-8ubuntu2; = 2:6.1.4.1+dfsg-8ubuntu2+esm1; All versions | No fix listed | No fix yet |
| activerecord project activerecord | >= 6.0.0, < 6.0.6.1; >= 6.1.0, < 6.1.7.1; >= 7.0.0, < 7.0.4.1 | 6.0.6.1, 6.1.7.1, 7.0.4.1 | Fixed |
| debian/rails(Debian 12) | < 2:6.1.7.3+dfsg-1 | 2:6.1.7.3+dfsg-1 | Fixed |
| debian/rails(Debian 13) | < 2:6.1.7.3+dfsg-1 | 2:6.1.7.3+dfsg-1 | Fixed |
| debian/rails(Debian 14) | < 2:6.1.7.3+dfsg-1 | 2:6.1.7.3+dfsg-1 | Fixed |
| rubygems activerecord(RubyGems) | = 6.0.0; = 6.0.1; = 6.0.1.rc1; = 6.0.2 +58 more | 6.0.6.1, 6.1.7.1, 7.0.4.1 | Fixed |
Affected products
| Product | Affected versions | Fixed in |
|---|---|---|
| rubygems activerecord(RubyGems) | >= 6.0.0, < 6.0.6.1 | 6.0.6.1 |
| rubygems activerecord(RubyGems) | >= 6.1.0, < 6.1.7.1 | 6.1.7.1 |
| rubygems activerecord(RubyGems) | >= 7.0.0, < 7.0.4.1 | 7.0.4.1 |
| rubygems activerecord(RubyGems) | = 6.0.0 | No fix listed |
| rubygems activerecord(RubyGems) | = 6.0.1 | No fix listed |
| rubygems activerecord(RubyGems) | = 6.0.1.rc1 | No fix listed |
| rubygems activerecord(RubyGems) | = 6.0.2 | No fix listed |
| rubygems activerecord(RubyGems) | = 6.0.2.1 | No fix listed |
| rubygems activerecord(RubyGems) | = 6.0.2.2 | No fix listed |
| rubygems activerecord(RubyGems) | = 6.0.2.rc1 | No fix listed |
| rubygems activerecord(RubyGems) | = 6.0.2.rc2 | No fix listed |
| rubygems activerecord(RubyGems) | = 6.0.3 | No fix listed |
| rubygems activerecord(RubyGems) | = 6.0.3.1 | No fix listed |
| rubygems activerecord(RubyGems) | = 6.0.3.2 | No fix listed |
| rubygems activerecord(RubyGems) | = 6.0.3.3 | No fix listed |
| rubygems activerecord(RubyGems) | = 6.0.3.4 | No fix listed |
| rubygems activerecord(RubyGems) | = 6.0.3.5 | No fix listed |
| rubygems activerecord(RubyGems) | = 6.0.3.6 | No fix listed |
| rubygems activerecord(RubyGems) | = 6.0.3.7 | No fix listed |
| rubygems activerecord(RubyGems) | = 6.0.3.rc1 | No fix listed |
| rubygems activerecord(RubyGems) | = 6.0.4 | No fix listed |
| rubygems activerecord(RubyGems) | = 6.0.4.1 | No fix listed |
| rubygems activerecord(RubyGems) | = 6.0.4.2 | No fix listed |
| rubygems activerecord(RubyGems) | = 6.0.4.3 | No fix listed |
| rubygems activerecord(RubyGems) | = 6.0.4.4 | No fix listed |
Show 79 more
| Product | Affected versions | Fixed in |
|---|---|---|
| rubygems activerecord(RubyGems) | = 6.0.4.5 | No fix listed |
| rubygems activerecord(RubyGems) | = 6.0.4.6 | No fix listed |
| rubygems activerecord(RubyGems) | = 6.0.4.7 | No fix listed |
| rubygems activerecord(RubyGems) | = 6.0.4.8 | No fix listed |
| rubygems activerecord(RubyGems) | = 6.0.5 | No fix listed |
| rubygems activerecord(RubyGems) | = 6.0.5.1 | No fix listed |
| rubygems activerecord(RubyGems) | = 6.0.6 | No fix listed |
| rubygems activerecord(RubyGems) | = 6.1.0 | No fix listed |
| rubygems activerecord(RubyGems) | = 6.1.1 | No fix listed |
| rubygems activerecord(RubyGems) | = 6.1.2 | No fix listed |
| rubygems activerecord(RubyGems) | = 6.1.2.1 | No fix listed |
| rubygems activerecord(RubyGems) | = 6.1.3 | No fix listed |
| rubygems activerecord(RubyGems) | = 6.1.3.1 | No fix listed |
| rubygems activerecord(RubyGems) | = 6.1.3.2 | No fix listed |
| rubygems activerecord(RubyGems) | = 6.1.4 | No fix listed |
| rubygems activerecord(RubyGems) | = 6.1.4.1 | No fix listed |
| rubygems activerecord(RubyGems) | = 6.1.4.2 | No fix listed |
| rubygems activerecord(RubyGems) | = 6.1.4.3 | No fix listed |
| rubygems activerecord(RubyGems) | = 6.1.4.4 | No fix listed |
| rubygems activerecord(RubyGems) | = 6.1.4.5 | No fix listed |
| rubygems activerecord(RubyGems) | = 6.1.4.6 | No fix listed |
| rubygems activerecord(RubyGems) | = 6.1.4.7 | No fix listed |
| rubygems activerecord(RubyGems) | = 6.1.5 | No fix listed |
| rubygems activerecord(RubyGems) | = 6.1.5.1 | No fix listed |
| rubygems activerecord(RubyGems) | = 6.1.6 | No fix listed |
| rubygems activerecord(RubyGems) | = 6.1.6.1 | No fix listed |
| rubygems activerecord(RubyGems) | = 6.1.7 | No fix listed |
| rubygems activerecord(RubyGems) | = 7.0.0 | No fix listed |
| rubygems activerecord(RubyGems) | = 7.0.1 | No fix listed |
| rubygems activerecord(RubyGems) | = 7.0.2 | No fix listed |
| rubygems activerecord(RubyGems) | = 7.0.2.1 | No fix listed |
| rubygems activerecord(RubyGems) | = 7.0.2.2 | No fix listed |
| rubygems activerecord(RubyGems) | = 7.0.2.3 | No fix listed |
| rubygems activerecord(RubyGems) | = 7.0.2.4 | No fix listed |
| rubygems activerecord(RubyGems) | = 7.0.3 | No fix listed |
| rubygems activerecord(RubyGems) | = 7.0.3.1 | No fix listed |
| rubygems activerecord(RubyGems) | = 7.0.4 | No fix listed |
| debian/rails(Debian:12) | < 2:6.1.7.3+dfsg-1 | 2:6.1.7.3+dfsg-1 |
| debian/rails(Debian:13) | < 2:6.1.7.3+dfsg-1 | 2:6.1.7.3+dfsg-1 |
| debian/rails(Debian:14) | < 2:6.1.7.3+dfsg-1 | 2:6.1.7.3+dfsg-1 |
| ubuntu/rails(Ubuntu:22.04) | All versions | No fix listed |
| ubuntu/rails(Ubuntu:24.04) | All versions | No fix listed |
| ubuntu/rails(Ubuntu:26.04) | All versions | No fix listed |
| ubuntu/rails(Ubuntu:26.10) | All versions | No fix listed |
| activerecord project activerecord | >= 6.0.0, < 6.0.6.1 | 6.0.6.1 |
| activerecord project activerecord | >= 6.1.0, < 6.1.7.1 | 6.1.7.1 |
| activerecord project activerecord | >= 7.0.0, < 7.0.4.1 | 7.0.4.1 |
| ubuntu/rails(Ubuntu:Pro:16.04) | All versions | No fix listed |
| ubuntu/rails(Ubuntu:Pro:16.04) | = 2:4.1.10-1 | No fix listed |
| ubuntu/rails(Ubuntu:Pro:16.04) | = 2:4.2.5-1 | No fix listed |
| ubuntu/rails(Ubuntu:Pro:16.04) | = 2:4.2.5.1-1 | No fix listed |
| ubuntu/rails(Ubuntu:Pro:16.04) | = 2:4.2.5.2-2 | No fix listed |
| ubuntu/rails(Ubuntu:Pro:16.04) | = 2:4.2.6-1 | No fix listed |
| ubuntu/rails(Ubuntu:Pro:16.04) | = 2:4.2.6-1ubuntu0.1~esm1 | No fix listed |
| ubuntu/rails(Ubuntu:Pro:16.04) | = 2:4.2.6-1ubuntu0.1~esm2 | No fix listed |
| ubuntu/rails(Ubuntu:Pro:18.04) | All versions | No fix listed |
| ubuntu/rails(Ubuntu:Pro:18.04) | = 2:4.2.9-2 | No fix listed |
| ubuntu/rails(Ubuntu:Pro:18.04) | = 2:4.2.9-4 | No fix listed |
| ubuntu/rails(Ubuntu:Pro:18.04) | = 2:4.2.10-0ubuntu4 | No fix listed |
| ubuntu/rails(Ubuntu:Pro:18.04) | = 2:4.2.10-0ubuntu4+esm1 | No fix listed |
| ubuntu/rails(Ubuntu:Pro:18.04) | = 2:4.2.10-0ubuntu4+esm2 | No fix listed |
| ubuntu/rails(Ubuntu:Pro:20.04) | All versions | No fix listed |
| ubuntu/rails(Ubuntu:Pro:20.04) | = 2:5.2.2.1+dfsg-1ubuntu1 | No fix listed |
| ubuntu/rails(Ubuntu:Pro:20.04) | = 2:5.2.3+dfsg-3 | No fix listed |
| ubuntu/rails(Ubuntu:Pro:20.04) | = 2:5.2.3+dfsg-3ubuntu0.1~esm1 | No fix listed |
| ubuntu/rails(Ubuntu:Pro:22.04) | All versions | No fix listed |
| ubuntu/rails(Ubuntu:Pro:22.04) | = 2:6.0.3.7+dfsg-2 | No fix listed |
| ubuntu/rails(Ubuntu:Pro:22.04) | = 2:6.1.4.1+dfsg-8ubuntu2 | No fix listed |
| ubuntu/rails(Ubuntu:Pro:22.04) | = 2:6.1.4.1+dfsg-8ubuntu2+esm1 | No fix listed |
| ubuntu/rails(Ubuntu:24.04) | = 2:6.1.7.3+dfsg-2build1 | No fix listed |
| ubuntu/rails(Ubuntu:24.04) | = 2:6.1.7.3+dfsg-3 | No fix listed |
| ubuntu/rails(Ubuntu:25.10) | All versions | No fix listed |
| ubuntu/rails(Ubuntu:25.10) | = 2:6.1.7.3+dfsg-7 | No fix listed |
| ubuntu/rails(Ubuntu:25.10) | = 2:7.2.2.1+dfsg-7 | No fix listed |
| ubuntu/rails(Ubuntu:26.10) | = 2:7.2.3+dfsg-2 | No fix listed |
| ubuntu/rails(Ubuntu:26.10) | = 2:7.2.3.2+dfsg-2 | No fix listed |
| ubuntu/rails(Ubuntu:26.04) | = 2:7.2.2.1+dfsg-7 | No fix listed |
| ubuntu/rails(Ubuntu:26.04) | = 2:7.2.2.2+dfsg-2 | No fix listed |
| ubuntu/rails(Ubuntu:26.04) | = 2:7.2.3+dfsg-2 | No fix listed |
References
- github.com
- github.com patch
- github.com exploit
- nvd.nist.gov third-party-advisory vendor-advisory
- discuss.rubyonrails.org exploit issue-tracking patch vendor-advisory
- DSA-5372 vendor-advisory
- security.netapp.com
- github.com
- github.com product
- Debian Security Tracker CVE-2023-22794 vendor-advisory
- Ubuntu CVE tracker issue-tracking vendor-advisory
- www.cve.org issue-tracking
- bugs.debian.org issue-tracking
- github.com issue-tracking