CVE-2023-22794
high
CVSS v3
—
CVSS v2
—
VIR risk
8.0
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.
Predictions
Exploit likelihood
30%
Patch ETA
—
Heuristic predictions, AS-IS, for prioritization only.
Mitigations
Vendor advisory: debian — https://security-tracker.debian.org/tracker/CVE-2023-22794
Vendor advisory: rocky — https://errata.rockylinux.org/RLSA-2023:6818
OS impact
| OS | Version | Status | Fixed in |
|---|---|---|---|
| rocky | 8 | fixed | |
| debian | bookworm | fixed | 2:6.1.7.3+dfsg-1 |
| debian | bullseye | fixed | 2:6.0.3.7+dfsg-2+deb11u1 |
| debian | forky | fixed | 2:6.1.7.3+dfsg-1 |
| debian | sid | fixed | 2:6.1.7.3+dfsg-1 |
| debian | trixie | fixed | 2:6.1.7.3+dfsg-1 |
Package impact
| Ecosystem | Package | Vulnerable | Fixed |
|---|---|---|---|
| RubyGems | activerecord | !< 6.0.0||<~> 6.0.6, >= 6.0.6.1 | ~> 6.0.6, >= 6.0.6.1 |
| RubyGems | activerecord | >=6.0.0,<6.0.6.1 | 6.0.6.1 |
| RubyGems | activerecord | >=6.1.0,<6.1.7.1 | 6.1.7.1 |
| RubyGems | activerecord | >=7.0.0,<7.0.4.1 | 7.0.4.1 |
References
- https://github.com/rails/rails/releases/tag/v7.0.4.1
- https://errata.rockylinux.org/RLSA-2023:6818
- https://nvd.nist.gov/vuln/detail/CVE-2023-22794
- https://github.com/rails/rails/commit/d7aba06953f9fa789c411676b941d20df8ef73de
- https://discuss.rubyonrails.org/t/cve-2023-22794-sql-injection-vulnerability-via-activerecord-comments/82117
- https://github.com/rails/rails
- https://github.com/rubysec/ruby-advisory-db/blob/master/gems/activerecord/CVE-2023-22794.yml
- https://security.netapp.com/advisory/ntap-20240202-0008
- https://www.debian.org/security/2023/dsa-5372
- https://security-tracker.debian.org/tracker/CVE-2023-22794
Verify integrity in audit chain (admin only). AS-IS.