Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessIdentify network endpoint passing user input to ash_sql string filter
-
DeliverySubmit search string containing \% or trailing \
-
ExploitEscape helper in AshSql.Expr fails to neutralize backslash
-
ExecutionLive LIKE wildcard survives into SQL LIKE pattern
-
ImpactWiden query results to probe restricted data or crash query
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Query language parameterization
|
| Exploitation Conditions | Exploitation requires that the target application passes user-controlled string input directly - without stripping or rejecting backslash characters - to ash_sql's contains/2, string_starts_with/2, or string_ends_with/2 filter functions on a column backed by a SQL LIKE expression. The attacker must supply a backslash immediately preceding a % or _ character (e.g., \%) to defeat the escape helper, or a trailing lone backslash to trigger the DoS variant. Authentication requirements are entirely determined by the host application's own access controls; ash_sql itself imposes none, and the provided CVSS PR:N confirms no privilege elevation is needed within the library layer. Exploitation is structurally limited to LIKE pattern manipulation - the query remains parameterized, preventing breakout to arbitrary SQL. Applications that do not expose these three filter functions to user-supplied input are unaffected, as are versions 0.7.1 and later. |
| Impact | The CVSS 4.0 score of 2.1 (Very Low) accurately reflects the narrow blast radius: the search value stays parameterized, so this cannot escalate to arbitrary SQL execution. Real-world impact is bounded to three concrete outcomes: widening a LIKE match to retrieve unintended rows (limited information disclosure), bypassing a negated contains() guard in application-layer access checks, or crashing a query with a trailing lone backslash (low-severity DoS). The DoS path may be the most operationally impactful, as it requires only a single character and can be triggered repeatedly. EPSS data is not available for independent comparison. The vulnerability is not listed in CISA KEV and no public exploit code has been identified, consistent with limited active exploitation. One notable inconsistency: the provided CVSS 4.0 vector assigns AV:L (Local), which conflicts with a user-supplied search-term attack surface that is almost certainly network-reachable in typical Ash application deployments - verify the AV metric with the EEF reporter before using the vendor score for prioritization. AT:P (attack requirement present) is well-grounded: only applications that pass raw user input to the three affected filter functions are exposed. |
| Exploit ScenarioDerived | An attacker submits the search string \% (backslash followed by percent) to any application endpoint that feeds user input into an ash_sql contains/2 filter - for example, a product search or user lookup form; the broken escape logic in AshSql.Expr transforms this into \\%, which the underlying SQL engine interprets as a literal backslash plus an unescaped wildcard, causing the query to match far more rows than intended and potentially leaking records the application was designed to restrict. For the availability variant, submitting a search string that ends with a lone backslash produces a malformed LIKE pattern that the database rejects with a syntax error, crashing the query for that request. No public exploit code was identified at time of analysis, but the technique is trivially derivable from the public description and commit diff. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAI
SQL LIKE wildcard injection in ash_sql (Elixir, versions 0.1.1-rc.10 through 0.7.0) allows any user who can supply a search string to the contains/2, string_starts_with/2, or string_ends_with/2 filter functions to reintroduce live LIKE wildcards that the escape helper was intended to neutralize. The escape helper prefixes % and _ with backslash but never first escapes a backslash already present in user input, so the sequence \% survives escaping with its % intact as an unescaped wildcard, enabling attackers to widen query matches, evade negated filter guards, or crash individual queries with a trailing lone backslash. No public exploit has been identified at time of analysis, and a vendor-released fix is available in version 0.7.1.
RemediationAI
Upgrade ash_sql to version 0.7.1 or later, which incorporates the fix from commit d95c55c64b1b42cc2fd30211a4913f3145156cd4 (https://github.com/ash-project/ash_sql/commit/d95c55c64b1b42cc2fd30211a4913f3145156cd4). The vendor advisory is at https://github.com/ash-project/ash_sql/security/advisories/GHSA-5jgp-7mhc-6qqh. If an immediate upgrade is not feasible, a compensating control is to strip or reject backslash characters in user-supplied search strings at the application boundary before they are passed to contains/2, string_starts_with/2, or string_ends_with/2; the trade-off is that backslash is a legitimate substring character, so blanket rejection may break searches for file paths or escape sequences, and stripping silently alters user intent. A tighter alternative is to reject inputs containing the specific two-character sequences \%, \_, or a trailing lone \, rather than all backslashes, minimizing false positives while blocking the known exploit patterns.
Affected VersionsENISA
Affected Packages
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 an Elixir library that compiles Ash framework query expressions into SQL via Ecto. The functions contains/2, string_starts_with/2, and string_ends_with/2 translate to SQL LIKE expressions and rely on an escape helper in AshSql.Expr to neutralize the LIKE metacharacters % and _. The root cause is CWE-943 (Improper Neutralization of Special Elements in Data Query Logic): the pre-fix regex ~r/([\%_])/u did not include the backslash character itself in the escape set. Because backslash is the SQL LIKE default escape character, a user-supplied \% becomes \\% in the pattern - which the database interprets as a literal backslash followed by an unescaped % wildcard. The fix in commit d95c55c64b1b42cc2fd30211a4913f3145156cd4 expands the regex to ~r/([\\%_])/u, ensuring backslashes are escaped before the wildcard characters, eliminating the escape-defeat condition. The query value itself remains parameterized throughout, so exploitation is strictly confined to LIKE pattern grammar and does not constitute full SQL injection.
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
CVSS:4.0/AV:L/AC:L/AT:P/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N
Search endpoints are network-reachable, no complexity barrier exists, the wildcard escape defeat yields low confidentiality impact, and the trailing-backslash DoS yields low availability impact.
Primary rating from Vendor (EEF).
CVSS VectorVendor: EEF
DescriptionCVE.org
Improper Neutralization of Special Elements in Data Query Logic vulnerability in ash-project ash_sql allows a user who supplies a search term to contains/2, string_starts_with/2, or string_ends_with/2 to inject live SQL LIKE wildcards, turning a literal substring search into an attacker-controlled pattern match.
The escape helpers in AshSql.Expr prefix % and _ with a backslash but never escape a backslash already present in the input. Because backslash is the default LIKE escape character, the escaping defeats itself: the input \% becomes the pattern fragment \\%, where \\ is a literal backslash and the attacker's % remains a live wildcard. The search value stays parameterized, so this is confined to the LIKE pattern grammar rather than full SQL. An attacker can widen matches to probe values, slip past a negated contains(...) guard, or crash the query with a trailing lone backslash.
This issue affects ash_sql: from 0.1.1-rc.10 before 0.7.1.
Threat Intelligence Overview
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.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
NoSQL injection exploits databases that don't use traditional SQL syntax-like MongoDB, CouchDB, or Redis-by manipulating queries through unsanitized user input.
Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.
Incorrect string trimming in ash_sql causes divergent behavior between SQL-layer and in-memory evaluation of the `string
Cross-tenant aggregate data leakage in ash_sql affects Elixir applications using schema-based multitenancy with strategy
EUVD-2026-68188
NVD
CVE.org
EPSS
Vulnrichment
GitHub
VulDB
Exploit-DB