Skip to main content

ash_sql CVE-2026-78691

| EUVDEUVD-2026-68188 LOW
Improper Neutralization of Special Elements in Data Query Logic (CWE-943)
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
    Identify network endpoint passing user input to ash_sql string filter
  2. Delivery
    Submit search string containing \% or trailing \
  3. Exploit
    Escape helper in AshSql.Expr fails to neutralize backslash
  4. Execution
    Live LIKE wildcard survives into SQL LIKE pattern
  5. Impact
    Widen 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.

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

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

Alert me

AnalysisAI

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

ash_sql 0.1.1-rc.10 <0.7.1
ash_sql cfc7da474c5be2190fd62664a83a689377a8d512 <d95c55c64b1b42cc2fd30211a4913f3145156cd4

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 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

Vendor (EEF) PRIMARY 2.1 LOW
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
vuln.today AI 6.5 MEDIUM

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.

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:L
4.0 AV:N/AC:L/AT:P/PR:N/UI:N/VC:L/VI:N/VA:L/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
Low
Vulnerable system: Integrity
None
Vulnerable system: Availability
None
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

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

EPSS Score
0.1%
Top 97% exploitable
Prevalence
Low
niche Elixir/Ash framework library, limited enterprise adoption
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment 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.1%
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

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.

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