Intel

AIKIDO-2026-826020

ash_sql is vulnerable to Improper Input Validation

Improper Input ValidationCVE-2026-80227 Published Yesterday

21

Low Risk

This Affects:

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

TL;DR

The string_trim/1 expression in lib/expr.ex compiles to a Postgres REGEXP_REPLACE call intended to strip leading and trailing whitespace. The generated SQL treats \s as a literal space rather than a regex whitespace class, so only ASCII space characters are removed while tabs, newlines, carriage returns, and form feeds survive. Applications that rely on string_trim/1 for trimmed-uniqueness or trimmed-equality checks can be bypassed by submitting values padded with non-space whitespace, which the database treats as distinct from the trimmed in-memory value. The fix generates a pattern that removes all whitespace to match Elixir's String.trim/1.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and you rely on the string_trim/1 expression for uniqueness, equality, or validation checks.

Background info

ash_sql is vulnerable to Improper Input Validation in versions 0.0.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