Skip to content
May 20, 2025
  • Linkedin
  • Twitter
  • Facebook
  • Youtube

Daily CyberSecurity

Primary Menu
  • Home
  • Cyber Security
  • Cybercriminals
  • Data Leak
  • Linux
  • Malware Attack
  • Open Source Tool
  • Technology
  • Vulnerability
  • Home
  • News
  • Vulnerability
  • CVE-2023-22794: RubyGems ActiveRecord SQL Injection Vulnerability
  • Vulnerability

CVE-2023-22794: RubyGems ActiveRecord SQL Injection Vulnerability

Ddos January 19, 2023 2 min read
CVE-2023-22794

On January 18, a SQL injection vulnerability was disclosed that impacts some specific versions of the Ruby on Rails (a.k.a. Rails) platform. According to an advisory, the SQLi flaw was discovered within Rails’ ActiveRecord.

Active Record insulates you from the need to use SQL in most cases. It will perform queries on the database for you and is compatible with most database systems, including MySQL, MariaDB, PostgreSQL, and SQLite. Regardless of which database system you’re using, the Active Record method format will always be the same.

CVE-2023-22794

RubyGems ActiveRecord is vulnerable to SQL injection. Tracked as CVE-2023-22794, the flaw related to the sanitization of comments. An attacker could send specially-crafted SQL statements to the system, which could allow the attacker to read or modify any data on the underlying database.

“There is a possible vulnerability in ActiveRecord related to the sanitization of comments. This vulnerability has been assigned the CVE identifier CVE-2023-22794,” the advisory explains.

“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 with insufficient sanitization and be able to inject SQL outside of the comment,” they add.

The security vulnerability affected ActiveRecord 6.0.x prior to versions 6.0.6.1, 6.1.x prior to versions 6.1.7.1, and 7.0.0 prior to version 7.0.4.1, and was fixed by Rails in versions 6.0.6.1, 6.1.7.1, 7.0.4.1. Other vulnerabilities were also fixed in these versions including:

  • [CVE-2023-22797] Possible Open Redirect Vulnerability in Action Pack
  • [CVE-2022-44566] Possible Denial of Service Vulnerability in ActiveRecord’s PostgreSQL
  • [CVE-2023-22795] Possible ReDoS based DoS vulnerability in Action Dispatch
  • [CVE-2023-22796] Possible ReDoS based DoS vulnerability in Active Support’s underscore
  • [CVE-2023-22792] Possible ReDoS based DoS vulnerability in Action Dispatch

Organizations working with Rails should upgrade to remain on the safe side. Upgraded versions of Rails are available here. To aid users who aren’t able to upgrade immediately Rails has provided patches for the two supported release series. They are in git-am format and consist of a single changeset.

  • 6-0-Make-sanitize_as_sql_comment-more-strict.patch – Patch for 6.0 series
  • 6-1-Make-sanitize_as_sql_comment-more-strict.patch – Patch for 6.1 series
  • 7-0-Make-sanitize_as_sql_comment-more-strict.patch – Patch for 7.0 series
Rate this post

Found this helpful?

If this article helped you, please share it with others who might benefit.

Tags: CVE-2023-22794 Rails Ruby

Continue Reading

Previous: Researchers release PoC exploit for ManageEngine RCE (CVE-2022-47966)
Next: How many types of SSL certificates are available?

Search

💙 Support Us!
We need 50 contributors this month to keep this site running.
14 of 50 supporters this month
☕ Buy Me a Coffee PayPalDonate
Our Websites
  • Penetration Testing Tools
  • The Daily Information Technology
    • About SecurityOnline.info
    • Advertise on SecurityOnline.info
    • Contact

    When you purchase through links on our site, we may earn an affiliate commission. Here’s how it works

    • Disclaimer
    • Privacy Policy
    • DMCA NOTICE
    • Linkedin
    • Twitter
    • Facebook
    • Youtube
    Copyright © All rights reserved.
    x