Skip to main content

ash_sql CVE-2026-80227

| EUVDEUVD-2026-68187 LOW
Incorrect Comparison (CWE-697)
2026-08-30 EEF
2.1
CVSS 4.0 · Vendor: EEF
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Submit string padded with tab or newline
  2. Delivery
    ash_sql compiles to REGEXP_REPLACE stripping spaces only
  3. Exploit
    Database accepts padded string as distinct value
  4. Execution
    Uniqueness or equality constraint bypassed
  5. Impact
    Near-duplicate record persisted

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Incorrect comparison
Exploitation Conditions

The target application must run ash_sql version 0.1.0 through 0.7.0. The string_trim/1 function must be explicitly used within an Ash resource definition - in a filter, uniqueness identity block, or changeset validation - and that expression must be evaluated at the SQL layer (the default for database-backed queries). The attacker must be able to submit string input containing at least one of: horizontal tab (U+0009), line feed (U+000A), carriage return (U+000D), or form feed (U+000C). Applications that do not reference string_trim/1 in their Ash data layer are entirely unaffected, as are those relying solely on database-native UNIQUE constraints independent of the ash_sql trimming logic.

Impact

The CVSS 4.0 score of 2.1 with vector AV:L/AC:L/AT:P/PR:N/UI:N/VC:N/VI:L reflects a narrow, conditions-dependent integrity issue. AT:P correctly captures that the vulnerable code path must be active - specifically, string_trim/1 must appear in the application's Ash data layer. The impact is limited to low integrity (VI:L); there is no confidentiality or availability consequence. No EPSS score, CISA KEV listing, or public exploit code is present in the available intelligence, all of which are consistent with a low-risk finding in a niche ecosystem. The 'Information Disclosure' tag present in source metadata conflicts with the CVSS impact metrics (VC:N) and appears to be mislabeled. Real-world risk is application-specific: deployments that use string_trim/1 in uniqueness identities or equality filters face a data-integrity bypass; those that do not are entirely unaffected. Given the small affected ecosystem, low severity, absence of public exploit, and availability of a straightforward patch, this is a low-priority remediation target for most teams.

Exploit ScenarioDerived

An attacker submitting a user-registration form could enter a username such as 'admin' with a trailing tab character; the SQL REGEXP_REPLACE pattern strips only spaces and so the database treats the padded value as distinct from the existing 'admin' record, allowing the near-duplicate to be inserted and bypassing the uniqueness identity. Elixir's in-memory evaluation would consider them equal, creating an inconsistency that could be leveraged to impersonate or shadow an existing account. No public exploit code has been identified at time of analysis.

Monitor Track and reassess. Why: LOW severity (CVSS 0.1-3.9).
Patch available 0.3% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAI

Incorrect string trimming in ash_sql causes divergent behavior between SQL-layer and in-memory evaluation of the string_trim/1 function, enabling users to pad string fields with tab, newline, carriage-return, or form-feed characters to bypass trimmed uniqueness or equality checks. All ash_sql versions from 0.1.0 up to (not including) 0.7.1 are affected wherever string_trim/1 appears in Ash filters, validations, or identity constraints that are evaluated at the SQL layer. No public exploit has been identified and no active exploitation is confirmed; the overall risk is low (CVSS 4.0: 2.1), but the bypass can permit duplicate record creation or filter evasion in affected applications.

RemediationAI

Upgrade ash_sql to version 0.7.1 or later, which corrects the Elixir string escaping in the REGEXP_REPLACE pattern generation (commit 1b11b5d8bc5321e2e6acac21594ef08f61986117, referenced in the advisory at https://github.com/ash-project/ash_sql/security/advisories/GHSA-76wx-w7ww-5xfq); update the dependency in mix.exs and run mix deps.update ash_sql. If an immediate upgrade is not feasible, audit all Ash resources for uses of string_trim/1 in filters, identity blocks, and validations and replace them with database-native UNIQUE constraints (unaffected by this trimming logic) or normalize whitespace in application code before values reach the Ash layer. Note that removing string_trim/1 from existing identity checks may require a database migration if records already contain the non-space whitespace padding characters.

Affected VersionsENISA

ash_sql dd092ed273dec7bd2194352f24a39229fc8ae68b <1b11b5d8bc5321e2e6acac21594ef08f61986117
ash_sql 0.1.0 <0.7.1

Affected Packages

euvd ash_sql fix: 0.7.1

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

ash_sql (CPE: cpe:2.3:a:ash-project:ash_sql:*:*:*:*:*:*:*:*) is the SQL adapter layer for the Ash Framework, an Elixir resource-management library. The root cause is CWE-697 (Incorrect Comparison): the string_trim/1 function compiles to a SQL REGEXP_REPLACE call using an Elixir string literal in which \s is not a regex whitespace metacharacter but an escape for a single literal space (codepoint 32). The generated SQL pattern therefore strips only spaces, while Elixir's String.trim/1 - used during in-memory expression evaluation - strips all Unicode whitespace including tab (U+0009), line feed (U+000A), carriage return (U+000D), and form feed (U+000C). This semantic split means a string containing only non-space whitespace padding passes the SQL-side trimmed comparison but fails the same comparison evaluated in Elixir memory, or vice versa. The commit fix (1b11b5d) corrects the Elixir raw string from '\s+$' to '\\s+$', preserving the backslash through to SQL so the database engine interprets \s as a proper regex whitespace class.

Know when Ash Sql gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (EEF) PRIMARY 2.1 LOW
CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N
vuln.today AI 5.3 MEDIUM

Exploitation is triggered via network-submitted user input with no privileges required; only low integrity impact from uniqueness bypass; no confidentiality or availability effect.

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
4.0 AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N

Primary rating from Vendor (EEF).

CVSS VectorVendor: EEF

Attack Vector
Local
Attack Complexity
Low
Attack Requirements
Present
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
Low
Vulnerable system: Availability
None
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

DescriptionCVE.org

Incorrect Comparison vulnerability in ash-project ash_sql allows a user to pad a string field with tab, newline, carriage-return, or form-feed characters and pass a trimmed uniqueness or equality check in the database that the same expression would fail in memory (or the reverse).

string_trim/1 compiles to REGEXP_REPLACE patterns built from an Elixir string in which \s is the escape for a single space (codepoint 32), not a regex whitespace class. The generated SQL therefore removes only literal spaces and leaves tabs, newlines, carriage returns, and form feeds in place, whereas String.trim/1 in Elixir removes them all. Any Ash filter, validation, or identity that relies on string_trim/1 then behaves differently depending on whether Ash pushes the expression down to SQL or evaluates it in memory, so padded input can register a near-duplicate value or slip past a trimmed comparison.

This issue affects ash_sql: from 0.1.0 before 0.7.1.

Threat Intelligence Overview

EPSS Score
0.3%
Top 83% exploitable
Prevalence
Low
niche Elixir Ash Framework library, limited ecosystem footprint
Social Media
1
Sightings
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment CIRCL GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity LOW
CISA KEV No
Public POC No
EPSS 0.3%
Patch available Yes
Active threat No
Deciding rule
LOW severity (CVSS 0.1-3.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Defer
Exploitation
Poc
System Exposure· derived
Small
Automatable
No
Human Impact· derived
Low
Technical Impact
Partial

Priority Score

10
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +10
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy