ash_sql is vulnerable to SQL Injection
21
Low Risk
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.
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.
ash_sql is vulnerable to SQL Injection in versions 0.1.1 - 0.7.0.
Upgrade the ash_sql library to the patch version.
Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.
Free. No credit card required.

I consent to receiving marketing communications based on Aikido’s Privacy Policy.
SOC 2Compliant
ISO 27001Compliant
ISO 42001Compliant© All Intel data is openly available and commercially licensed.