Skip to content
Threat Feed
high advisory

Trilogy: SQL Injection vulnerability via multibyte encodings

A SQL injection vulnerability in the Trilogy library (versions prior to 2.13.2) allows unauthenticated attackers to execute arbitrary SQL via improperly escaped multibyte strings.

Triage facts

Revision 1
Applicability
trilogy (< 2.13.2)
Evidence
Unknown
Severity
High
Action
Elevated
Sources
3 public sources
Freshness
Revision 1Oct 30, 21:20 UTC
Source quality
A1Likely

A SQL injection vulnerability exists in the Trilogy library, an underlying database client used in some Ruby on Rails environments. The flaw stems from improper handling of multibyte character encodings during string escaping, which can allow an attacker to bypass protection mechanisms. Updating to version 2.13.2 or later is required to mitigate this vulnerability.

Impact

Successful exploitation could lead to unauthorized database access, data exfiltration, or modification of application data depending on the implementation of the database queries and the application environment.

Recommendation

  • Upgrade the Trilogy library to version 2.13.2 or later in all projects utilizing the library as a database dependency.
  • Audit database queries using user-supplied input to ensure that parameterized queries or safe ORM methods are used as a defense-in-depth measure.
  • Review application logs for unusual query patterns or unexpected database errors that may indicate injection attempts.

Immediate actions

Upgrade Trilogy dependency to 2.13.2 or later

Development Team 48h

Threat Hunt

Identify applications using Trilogy that accept multibyte input

T1190 medium medium confidence hunt now

Data: Software dependency manifest (Gemfile.lock), Database query logs

Mitigations

Apply security patch by updating Trilogy library to 2.13.2

immediate IT Operations

GHSA-744p-w4gc-m3gh