PT-2023-6422 · Unknown+3 · Active Record+3
Hmac
·
Published
2023-01-18
·
Updated
2025-09-29
·
CVE-2023-22794
CVSS v2.0
9.0
High
| Vector | AV:N/AC:L/Au:S/C:C/I:C/A:C |
Name of the Vulnerable Software and Affected Versions
ActiveRecord versions 6.0.0 through 6.0.6, versions 6.1.0 through 6.1.7, and versions 7.0.0 through 7.0.4
Description
A vulnerability in ActiveRecord is related to the sanitization of comments, which may allow an attacker to inject SQL outside of the comment if malicious user input is passed to either the
annotate query method, the optimizer hints query method, or through the QueryLogs interface. This could potentially lead to the execution of arbitrary code. Users should avoid passing user input to these methods.Recommendations
For versions 6.0.0 through 6.0.6, upgrade to version 6.0.6.1 or apply the patch 6-0-Make-sanitize as sql comment-more-strict.patch.
For versions 6.1.0 through 6.1.7, upgrade to version 6.1.7.1 or apply the patch 6-1-Make-sanitize as sql comment-more-strict.patch.
For versions 7.0.0 through 7.0.4, upgrade to version 7.0.4.1 or apply the patch 7-0-Make-sanitize as sql comment-more-strict.patch.
As a temporary workaround, consider avoiding passing user input to the
annotate and optimizer hints query methods, and restrict the use of QueryLogs configuration that can include user input.Exploit
Fix
SQL injection
Found an issue in the description? Have something to add? Feel free to write us 👾
Weakness Enumeration
Related Identifiers
Affected Products
Alt Linux
Active Record
Red Os
Rocky Linux