Free and open · new CVEs checked every 20 minutesStatusRSSOpen dataContact

CVE-2023-22794: A vulnerability in ActiveRecord <6.0.6.1, v6.1.7.1 and v7.0.4.1 related to the sanitization of comments

56
This month
HIGH 8.8UPGRADE

CVE-2023-22794 is a high-severity flaw (CVSS 8.8) affecting activerecord. Below: why it ranks where it does, which versions are affected, what to do, and the exact commands.

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.

Why this priority

  • High severity
  • Public exploit reference

A fixed release or distro patch exists.

Risk facts

CVSS score8.8 (High)
Attack vectorNetwork (remote)
Attack complexityLow
Privileges neededLow
User interactionNone
EPSS exploit chance2.2% (top 18%)
CISA exploited listNo
WeaknessCWE-89
Published2023-02-09
Last modified2026-10-23
Publisher (CNA): HackerOne · Vendor: activerecord project

Am I affected?

Timeline

activerecord project activerecord UPGRADE
Affected: >= 6.0.0 and < 6.0.6.1 · >= 6.1.0 and < 6.1.7.1 · >= 7.0.0 and < 7.0.4.1
Fixed in: 6.0.6.1, 6.1.7.1, 7.0.4.1
Safe to downgrade to: a release before 6.0.0
1. Check installed version
apt-cache policy activerecord || rpm -q activerecord || activerecord --version
2. UPGRADE to 6.0.6.1 (Debian / Ubuntu)
sudo apt update && sudo apt install --only-upgrade activerecord
2. UPGRADE (RHEL / Amazon Linux / Fedora)
sudo dnf upgrade activerecord
Note
Distros often backport fixes without changing the version number. Confirm with the distro advisory or changelog.
3. If no update is available yet, DOWNGRADE to a release before 6.0.0 (Debian / Ubuntu)
apt-cache madison activerecord sudo apt install activerecord=<VERSION_BEFORE_6.0.0> sudo apt-mark hold activerecord
3. If no update is available yet, DOWNGRADE (RHEL / Amazon Linux / Fedora)
dnf --showduplicates list activerecord sudo dnf downgrade activerecord-<VERSION_BEFORE_6.0.0> sudo dnf versionlock add activerecord
Downgrade risk
Downgrading can break dependent software and may reopen older bugs. Read the distro advisory first and test on a non-production host.
After downgrade
Restart the service, and keep the package held until a fixed release ships.

Exact fixes by distribution

RubyGems · activerecord · FIXED · 6.0.6.1 · vulnerable: >= 6.0.0, < 6.0.6.1 · source
bundle update activerecord bundle list | grep activerecord
Fedora 46 · python-openslide · FIXED · 1.4.7-1.fc46 · FEDORA-2026-336bea884e · source
sudo dnf upgrade --advisory=FEDORA-2026-336bea884e
Fedora ELN · valgrind · FIXED · 3.28.0-1.eln159 · FEDORA-2026-c593ef1d15 · source
sudo dnf upgrade --advisory=FEDORA-2026-c593ef1d15
Debian 12 · rails · FIXED · 2:6.1.7.3+dfsg-1
sudo apt update && sudo apt install --only-upgrade rails dpkg --compare-versions "$(dpkg-query -W -f='${Version}' rails)" ge "2:6.1.7.3+dfsg-1" && echo PATCHED || echo STILL-VULNERABLE
Debian 13 · rails · FIXED · 2:6.1.7.3+dfsg-1
sudo apt update && sudo apt install --only-upgrade rails dpkg --compare-versions "$(dpkg-query -W -f='${Version}' rails)" ge "2:6.1.7.3+dfsg-1" && echo PATCHED || echo STILL-VULNERABLE
Verify at the official source NVD · CVE Program · Report a problem with this page
Scores and fixes here are computed automatically from those and other public sources. Confirm with the vendor advisory before changing production systems.

References

← Back to latest CVEs