RubySec

Providing security resources for the Ruby community

CVE-2022-29498 (blazer): SQL injection for certain queries with variables

ADVISORIES

GEM

blazer

SEVERITY

CVSS v3.x: 7.5 (High)

PATCHED VERSIONS

  • >= 2.6.0

DESCRIPTION

For some queries, specific variable values can modify the query rather than just the variable. This can occur if:

  1. the query’s data source uses different escaping than the Rails database OR
  2. the query has a variable inside a string literal

Since Blazer is designed to run arbitrary queries, the impact will typically be low. Users cannot run any queries they could not have already run. However, an attacker could get a user to run a query they would not have normally run. If the data source has write permissions, this could include modifying data in some cases.