Security mailing lists by PureSourceCode

CVE-2023-22794

HIGH 8.8CVSS 3.1

SQL Injection Vulnerability via ActiveRecord comments

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.

Published
9 Feb 2023
Last modified
23 Oct 2026
Assigned by
support@hackerone.com
NVD status
Modified
Weakness
CWE-89
Also known as
GHSA-hq7p-j377-6v63
Sources
NVDJSONOSV GHSA-hq7p-j377-6v63JSON

Scores

SourceScored byVersionScoreVector / decision
NVD nvd@nist.gov (Primary) CVSS 3.1 HIGH 8.8 CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
OSV GitHub CVSS 3.1 HIGH 8.8 CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Affected

SourceVendor / ecosystemProduct / packageAffected versionsFixed in
NVD activerecord_project activerecord
cpe:2.3:a:activerecord_project:activerecord:*:*:*:*:*:ruby:*:*
>= 6.0.0, < 6.0.6.1 6.0.6.1
NVD activerecord_project activerecord
cpe:2.3:a:activerecord_project:activerecord:*:*:*:*:*:ruby:*:*
>= 6.1.0, < 6.1.7.1 6.1.7.1
NVD activerecord_project activerecord
cpe:2.3:a:activerecord_project:activerecord:*:*:*:*:*:ruby:*:*
>= 7.0.0, < 7.0.4.1 7.0.4.1
OSV RubyGems activerecord >= 6.0.0, < 6.0.6.1 6.0.6.1
OSV RubyGems activerecord >= 6.1.0, < 6.1.7.1 6.1.7.1
OSV RubyGems activerecord >= 7.0.0, < 7.0.4.1 7.0.4.1

References

History

  • 25 Nov 2026 20:35 UTC · NVD: first stored (published 9 Feb 2023)
  • 25 Nov 2026 20:14 UTC · OSV: first stored (published 18 Jan 2023)
An unhandled error has occurred. Reload ×

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.