
CVE catalog
CVE-2023-22794
rails: CVE-2023-22794
- Severity
- High · CVSS 8.8
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H - Published
- Source
- [NVD] · [CVE record]
- EPSS
- 2.15% · Oct 25, 2026
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.
Vulnerable and fixed packages
Distribution-reported package versions and fixes. These do not depend on matching against the OpenFactory package catalog.
| Distribution | Package | Release | Version | Status |
|---|---|---|---|---|
| Debian | rails | sid | 2:7.2.4+dfsg-2 | fixed |
| Debian | rails | forky | 2:7.2.4+dfsg-1 | fixed |
| Debian | rails | trixie | 2:7.2.2.2+dfsg-2~deb13u1 | fixed |
| Debian | rails | trixie-security | 2:7.2.2.2+dfsg-2~deb13u2 | fixed |
| Debian | rails | bookworm | 2:6.1.7.10+dfsg-1~deb12u2 | fixed |
| Debian | rails | bookworm-security | 2:6.1.7.10+dfsg-1~deb12u3 | fixed |
| Cpe | activerecord | Not reported | 7.0.4.1 | fixed |
Fixed-version evidence
| Distribution | Package | Type | Release | Fixed version | Urgency | Origin | Bugs |
|---|---|---|---|---|---|---|---|
| Debian | rails | source | sid | 2:6.1.7.3+dfsg-1 | not yet assigned | Not reported | [1030050] |
| Debian | rails | source | forky | 2:6.1.7.3+dfsg-1 | not yet assigned | Not reported | [1030050] |
| Debian | rails | source | trixie | 2:6.1.7.3+dfsg-1 | not yet assigned | Not reported | [1030050] |
| Debian | rails | source | bookworm | 2:6.1.7.3+dfsg-1 | not yet assigned | Not reported | [1030050] |
| Cpe | activerecord | cpe | Not reported | 7.0.4.1 | Not reported | NVD-CVE-2023-22794 | Not reported |
OpenFactory catalog packages
Matching against OpenFactory catalog package versions is in progress.
References
- [https://access.redhat.com/errata/RHSA-2023:6818]
- [https://discuss.rubyonrails.org/t/cve-2023-22794-sql-injection-vulnerability-via-activerecord-comments/82117]
- [https://ftp.suse.com/pub/projects/security/csaf/opensuse-su-2024_12766-1.json]
- [https://nvd.nist.gov/vuln/detail/CVE-2023-22794]
- [https://osv.dev/vulnerability/DEBIAN-CVE-2023-22794]
- [https://security-tracker.debian.org/tracker/CVE-2023-22794]
- [https://security.netapp.com/advisory/ntap-20240202-0008/]
- [https://wid.cert-bund.de/.well-known/csaf/white/2023/wid-sec-w-2023-2101.json]
- [https://www.debian.org/security/2023/dsa-5372]
[CERT-Bund public advisories] · [Debian Security Tracker] · [FIRST EPSS] · [National Vulnerability Database (NVD)] · [OSV Package Vulnerability Database] · [Red Hat security advisories and VEX] · [SUSE security advisories and VEX]