rails — security advisory
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.
- Products
- rails
- Affected versions
- Not specified
- Fixed versions
- 2:6.1.7.3+dfsg-1
- CVEs
- CVE-2023-22794
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 1 Nov 2026, 04:08 UTC · Revision 1
Source evidence
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.
osv:DEBIAN-CVE-2023-22794
rails
Fixed versions: 2:6.1.7.3+dfsg-1
rails
Fixed versions: 2:6.1.7.3+dfsg-1
rails
Fixed versions: 2:6.1.7.3+dfsg-1
Complete source record
{
"id": "8776fc3cf67c39d38f5a3180134ee8913a99ba2131ddc0013640a28cef90a0e5",
"url": "https://osv.dev/vulnerability/DEBIAN-CVE-2023-22794",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "DEBIAN-CVE-2023-22794",
"summary": "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.",
"evidence": "osv:DEBIAN-CVE-2023-22794",
"products": [
{
"name": {
"value": "rails",
"evidence": "/affected/0/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "2:6.1.7.3+dfsg-1",
"evidence": "/affected/0/ranges"
}
],
"affected_versions": []
},
{
"name": {
"value": "rails",
"evidence": "/affected/1/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "2:6.1.7.3+dfsg-1",
"evidence": "/affected/1/ranges"
}
],
"affected_versions": []
},
{
"name": {
"value": "rails",
"evidence": "/affected/2/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "2:6.1.7.3+dfsg-1",
"evidence": "/affected/2/ranges"
}
],
"affected_versions": []
}
],
"severity": "high",
"structured": {
"id": "DEBIAN-CVE-2023-22794",
"aliases": [
"DEBIAN-CVE-2023-22794"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
}
],
"affected": [
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
},
{
"fixed": "2:6.1.7.3+dfsg-1"
}
]
}
],
"package": {
"name": "rails",
"purl": "pkg:deb/debian/rails?arch=source&distro=bookworm",
"ecosystem": "Debian:12"
},
"database_specific": {
"source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2023-22794.json"
},
"ecosystem_specific": {
"urgency": "not yet assigned"
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
},
{
"fixed": "2:6.1.7.3+dfsg-1"
}
]
}
],
"package": {
"name": "rails",
"purl": "pkg:deb/debian/rails?arch=source&distro=trixie",
"ecosystem": "Debian:13"
},
"database_specific": {
"source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2023-22794.json"
},
"ecosystem_specific": {
"urgency": "not yet assigned"
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
},
{
"fixed": "2:6.1.7.3+dfsg-1"
}
]
}
],
"package": {
"name": "rails",
"purl": "pkg:deb/debian/rails?arch=source&distro=forky",
"ecosystem": "Debian:14"
},
"database_specific": {
"source": "https://storage.googleapis.com/debian-osv/debian-cve-osv/DEBIAN-CVE-2023-22794.json"
},
"ecosystem_specific": {
"urgency": "not yet assigned"
}
}
],
"modified": "2026-10-24T09:47:32.847033084Z",
"provider": "osv",
"upstream": [
"CVE-2023-22794"
],
"references": [
"https://security-tracker.debian.org/tracker/CVE-2023-22794"
]
},
"related_cves": [
{
"value": "CVE-2023-22794",
"evidence": "/upstream"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 429020,
"published_at": "2023-02-09T20:15:11.353+00:00"
}