Intel

AIKIDO-2026-185607

ash_sql is vulnerable to SQL Injection

SQL InjectionCVE-2026-78691 Published Yesterday

21

Low Risk

This Affects:

ELIXIRash_sql
0.1.1 - 0.7.0
Fixed in 0.7.1
Are you affected? Scan for Free

TL;DR

The escape_contains/1, escape_starts_with/1, and escape_ends_with/1 helpers in lib/expr.ex build SQL LIKE patterns from user-supplied search terms. They escape % and _ wildcards but do not escape existing backslashes, so input such as \% survives as an active wildcard because backslash is the default LIKE escape character in Postgres and MySQL. User-controlled search terms can then inject wildcards to probe column values character by character or bypass negated contains() filters used as access controls. The fix escapes backslashes before the other special characters so the pattern matches the literal input.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and you pass user-controlled input into the contains, starts_with, or ends_with expression functions.

Background info

ash_sql is vulnerable to SQL Injection in versions 0.1.1 - 0.7.0.

How to fix this

Upgrade the ash_sql library to the patch version.

Are You Affected?

Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.

Free. No credit card required.

Aikido Platform