{"cve":"CVE-2023-22794","nvd":{"published":"2023-02-09T20:15:11.353","modified":"2026-10-23T23:10:00.157","status":"Modified","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_v4":null,"cvss_v3":{"version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":8.8},"cwes":["CWE-89"],"references":["https://discuss.rubyonrails.org/t/cve-2023-22794-sql-injection-vulnerability-via-activerecord-comments/82117","https://security.netapp.com/advisory/ntap-20240202-0008/","https://www.debian.org/security/2023/dsa-5372","https://discuss.rubyonrails.org/t/cve-2023-22794-sql-injection-vulnerability-via-activerecord-comments/82117","https://security.netapp.com/advisory/ntap-20240202-0008/"],"products":["activerecord_project:activerecord"],"source":"nvd","synced_at":"2026-10-24T16:53:27.712498749+00:00"},"epss":{"cve":"CVE-2023-22794","score":0.02153,"percentile":0.8203,"date":"2026-10-25"},"kev":null,"osv":[{"id":"GHSA-hq7p-j377-6v63","url":"https://osv.dev/vulnerability/GHSA-hq7p-j377-6v63","summary":"SQL Injection Vulnerability via ActiveRecord comments","modified":"2024-02-21T05:41:43.535952Z","packages":[{"ecosystem":"RubyGems","name":"activerecord","purl":"pkg:gem/activerecord","ranges":[">=6.0.0 <6.0.6.1"],"fixed":["6.0.6.1"]},{"ecosystem":"RubyGems","name":"activerecord","purl":"pkg:gem/activerecord","ranges":[">=6.1.0 <6.1.7.1"],"fixed":["6.1.7.1"]},{"ecosystem":"RubyGems","name":"activerecord","purl":"pkg:gem/activerecord","ranges":[">=7.0.0 <7.0.4.1"],"fixed":["7.0.4.1"]}]}],"attribution":["This product uses the NVD API but is not endorsed or certified by the NVD.","EPSS scores: FIRST Exploit Prediction Scoring System, https://www.first.org/epss","Known exploited vulnerabilities: CISA Known Exploited Vulnerabilities Catalog, https://www.cisa.gov/known-exploited-vulnerabilities-catalog","Package advisories: OSV (https://osv.dev), from the GitHub Advisory Database, PyPA, Go, RustSec and other ecosystem databases, under CC-BY 4.0 or CC0","CVE records: the CVE Program's CVE List (https://www.cve.org), under its terms of use (https://www.cve.org/Legal/TermsOfUse). CVE is a registered trademark of The MITRE Corporation; this product is not affiliated with the CVE Program."]}