# CVE-2026-80227: SQL string_trim removes only spaces, diverging from in-memory trimming in AshSql

- Severity: Low 2.1 (CVSS:4.0, scored by EEF) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.39%, higher than 35% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-08-30T11:53:35.548Z
- Modified: 2026-11-25T06:31:03.536Z
- Also known as: EEF-CVE-2026-80227, GHSA-76wx-w7ww-5xfq
- Weaknesses: CWE-697
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial
- Assigned by: EEF

## Description

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.

(As written by CVE List.)

## Affected

- ash_sql: from 0.1.0 before 0.7.1
- ash-project/ash_sql: from dd092ed273dec7bd2194352f24a39229fc8ae68b before 1b11b5d8bc5321e2e6acac21594ef08f61986117
- ash_sql (Hex): from 0.1.0 before 0.7.1
- https://github.com/ash-project/ash_sql: from dd092ed273dec7bd2194352f24a39229fc8ae68b before 1b11b5d8bc5321e2e6acac21594ef08f61986117

## Every score

- EEF: CVSS:4.0 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`
- Erlang Ecosystem Foundation: CVSS:4.0 `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`

## References

- <https://github.com/ash-project/ash_sql/security/advisories/GHSA-76wx-w7ww-5xfq> (exploit, advisory, related, vendor-advisory)
- <https://cna.erlef.org/cves/CVE-2026-80227.html> (related, web)
- <https://osv.dev/vulnerability/EEF-CVE-2026-80227> (related)
- <https://github.com/ash-project/ash_sql/commit/dd092ed273dec7bd2194352f24a39229fc8ae68b> (related, web)
- <https://github.com/ash-project/ash_sql/commit/1b11b5d8bc5321e2e6acac21594ef08f61986117> (fix, patch)
- <https://hex.pm/packages/ash_sql> (package)

## Sources

- CVE List: [CVE-2026-80227](https://www.cve.org/CVERecord?id=CVE-2026-80227), CVE Terms of Use, modified 2026-11-19
- Erlang Ecosystem Foundation: [EEF-CVE-2026-80227](https://osv.dev/vulnerability/EEF-CVE-2026-80227), CC-BY-4.0, modified 2026-11-25
- NVD: [CVE-2026-80227](https://nvd.nist.gov/vuln/detail/CVE-2026-80227), Public domain, modified 2026-11-19

---

Page: https://cve.day/CVE-2026-80227 · Whole record: https://cve.day/CVE-2026-80227.json · Rebuilt by cve.day 2026-11-25T22:59:35.762Z
