{"id":"CVE-2026-80227","aliases":["CVE-2026-80227","EEF-CVE-2026-80227","GHSA-76wx-w7ww-5xfq"],"related":[],"kind":"vulnerability","state":"published","title":"SQL string_trim removes only spaces, diverging from in-memory trimming in AshSql","summary":"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).\n\nstring_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.\n\nThis issue affects ash_sql: from 0.1.0 before 0.7.1.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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).\n\nstring_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.\n\nThis issue affects ash_sql: from 0.1.0 before 0.7.1.","source":"cvelist"},{"lang":"en","text":"## Summary\n\nIncorrect 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).\n\n`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.\n\nThis issue affects ash_sql: from 0.1.0 before 0.7.1.\n\n## Configurations\n\nAn application must use `string_trim/1` in a filter, validation, calculation, or identity that an attacker-influenced string field flows through, where the trimmed value is compared for equality or uniqueness.","format":"markdown","source":"eef"}],"published":"2026-08-30T11:53:35.548Z","modified":"2026-11-25T06:31:03.536Z","severity":{"scorer":"EEF","scheme":"CVSS:4.0","vector":"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","score":2.1,"rating":"LOW"},"severities":[{"scorer":"EEF","scheme":"CVSS:4.0","vector":"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","score":2.1,"rating":"LOW"},{"scorer":"Erlang Ecosystem Foundation","scheme":"CVSS:4.0","vector":"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"}],"cwes":["CWE-697"],"affected":[{"ranges":[{"type":"semver","introduced":"0.1.0","fixed":"0.7.1","status":"affected"}],"vendor":"ash-project","product":"ash_sql","package":"ash_sql","cpe":"cpe:2.3:a:ash-project:ash_sql:*:*:*:*:*:*:*:*","repo":"https://github.com/ash-project/ash_sql","source":"cvelist"},{"ranges":[{"type":"git","introduced":"dd092ed273dec7bd2194352f24a39229fc8ae68b","fixed":"1b11b5d8bc5321e2e6acac21594ef08f61986117","status":"affected"}],"vendor":"ash-project","product":"ash_sql","package":"ash-project/ash_sql","cpe":"cpe:2.3:a:ash-project:ash_sql:*:*:*:*:*:*:*:*","repo":"https://github.com/ash-project/ash_sql","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0.1.0","status":"affected","fixed":"0.7.1"}],"ecosystem":"Hex","package":"ash_sql","purl":"pkg:hex/ash_sql","source":"eef"},{"ranges":[{"type":"git","introduced":"dd092ed273dec7bd2194352f24a39229fc8ae68b","status":"affected","fixed":"1b11b5d8bc5321e2e6acac21594ef08f61986117"}],"repo":"https://github.com/ash-project/ash_sql","source":"eef"}],"references":[{"url":"https://github.com/ash-project/ash_sql/security/advisories/GHSA-76wx-w7ww-5xfq","tags":["advisory","exploit","related","vendor-advisory"],"sources":["cvelist","eef","nvd"]},{"url":"https://cna.erlef.org/cves/CVE-2026-80227.html","tags":["related","web"],"sources":["cvelist","eef","nvd"]},{"url":"https://osv.dev/vulnerability/EEF-CVE-2026-80227","tags":["related"],"sources":["cvelist","nvd"]},{"url":"https://github.com/ash-project/ash_sql/commit/dd092ed273dec7bd2194352f24a39229fc8ae68b","tags":["related","web"],"sources":["cvelist","eef","nvd"]},{"url":"https://github.com/ash-project/ash_sql/commit/1b11b5d8bc5321e2e6acac21594ef08f61986117","tags":["fix","patch"],"sources":["cvelist","eef","nvd"]},{"url":"https://hex.pm/packages/ash_sql","tags":["package"],"sources":["eef"]}],"credits":["Peter Ullrich","Jonatan Männchen / EEF","Zach Daniel / Ash Project"],"assigner":"EEF","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"partial","date":"2026-08-31T14:56:28.428Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-80227","url":"https://www.cve.org/CVERecord?id=CVE-2026-80227","licence":"CVE Terms of Use","modified":"2026-11-19T08:41:06.956Z"},{"source":"eef","name":"Erlang Ecosystem Foundation","id":"EEF-CVE-2026-80227","url":"https://osv.dev/vulnerability/EEF-CVE-2026-80227","licence":"CC-BY-4.0","modified":"2026-11-25T06:31:03.536Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-80227","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-80227","licence":"Public domain","modified":"2026-11-19T09:18:01.723Z"}],"updatedAt":"2026-11-25T22:59:35.762Z","epss":{"score":0.00367,"percentile":0.2269,"date":"2026-11-30T12:00:22.000Z"}}