CVE-2026-80227: CWE-697 Incorrect Comparison in ash-project ash_sql
Description
CVE-2026-80227 is an incorrect comparison vulnerability in ash-project's ash_sql component. It arises because the string_trim/1 function compiles to SQL that only removes literal spaces, unlike Elixir's String.trim/1 which removes all whitespace characters including tabs, newlines, carriage returns, and form feeds. This discrepancy allows padded strings with certain whitespace characters to pass trimmed uniqueness or equality checks in the database but fail in memory, or vice versa. This can cause near-duplicate values or bypass trimmed comparisons in filters, validations, or identities relying on string_trim/1.
CVSS v4.0
Score 2.1low
Affected software
ash-project
ash_sql
ash-project
ash_sql
cpe:2.3:a:ash-project:ash_sql:*:*:*:*:*:*:*:*Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability in ash_sql versions from 0.1.0 up to but not including 0.7.1 is due to a mismatch between how string trimming is implemented in SQL versus in-memory Elixir code. The SQL generated by string_trim/1 only removes literal space characters (codepoint 32) and leaves other whitespace characters intact, whereas Elixir's String.trim/1 removes all whitespace characters. This causes inconsistent behavior in trimmed uniqueness or equality checks depending on whether the expression is evaluated in the database or in memory, potentially allowing padded input to bypass intended uniqueness or equality constraints.
Potential Impact
This vulnerability can lead to inconsistent behavior in applications using ash_sql, where padded string inputs with tabs, newlines, carriage returns, or form feeds may bypass trimmed uniqueness or equality checks in the database or in memory. This could result in near-duplicate entries or incorrect validation outcomes. The CVSS score is low (2.1), indicating limited impact and complexity.
Mitigation Recommendations
No official fix or patch is currently available for this vulnerability. Users should monitor the vendor's advisories for updates. Until a fix is released, be cautious about relying on trimmed uniqueness or equality checks that use string_trim/1 in ash_sql, and consider implementing additional validation or normalization of input strings to ensure consistent handling of whitespace characters.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- EEF
- Date Reserved
- 2026-08-30T05:45:01.813Z
- Cvss Version
- 4.0
- State
- PUBLISHED
Threat ID: 6a941d0cacd9273b4981c0d2
Added to database: 08/30/2026, 12:07:40 UTC
Last enriched: 09/07/2026, 15:48:30 UTC
Last updated: 10/13/2026, 18:48:24 UTC
Views: 92
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.