{
  "affected": [
    {
      "ranges": [
        {
          "database_specific": {
            "extracted_events": [
              {
                "introduced": "0.1.0"
              },
              {
                "fixed": "0.7.1"
              }
            ],
            "source": [
              "DESCRIPTION",
              "REFERENCES"
            ]
          },
          "events": [
            {
              "introduced": "3025d9f3eb575ff2e21950d48c3987b72fbd42c2"
            },
            {
              "fixed": "cfe94c67484270db0f46384bd35cf1fbad8793d5"
            },
            {
              "fixed": "1b11b5d8bc5321e2e6acac21594ef08f61986117"
            }
          ],
          "repo": "https://github.com/ash-project/ash_sql",
          "type": "GIT"
        }
      ]
    }
  ],
  "aliases": [
    "GHSA-76wx-w7ww-5xfq"
  ],
  "database_specific": {
    "cna_assigner": "EEF",
    "cwe_ids": [
      "CWE-697"
    ],
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/80xxx/CVE-2026-80227.json",
    "unresolved_ranges": [
      {
        "extracted_events": [
          {
            "introduced": "dd092ed273dec7bd2194352f24a39229fc8ae68b"
          },
          {
            "fixed": "1b11b5d8bc5321e2e6acac21594ef08f61986117"
          }
        ],
        "source": "AFFECTED_FIELD"
      }
    ]
  },
  "details": "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.",
  "id": "CVE-2026-80227",
  "modified": "2026-09-04T03:31:00.586766996Z",
  "published": "2026-08-30T11:53:35.548Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://cna.erlef.org/cves/CVE-2026-80227.html"
    },
    {
      "type": "WEB",
      "url": "https://github.com"
    },
    {
      "type": "WEB",
      "url": "https://osv.dev/vulnerability/EEF-CVE-2026-80227"
    },
    {
      "type": "WEB",
      "url": "https://repo.hex.pm"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/80xxx/CVE-2026-80227.json"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/ash-project/ash_sql/security/advisories/GHSA-76wx-w7ww-5xfq"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-80227"
    },
    {
      "type": "FIX",
      "url": "https://github.com/ash-project/ash_sql/commit/1b11b5d8bc5321e2e6acac21594ef08f61986117"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/ash-project/ash_sql"
    }
  ],
  "schema_version": "1.9.0",
  "severity": [
    {
      "score": "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",
      "type": "CVSS_V4"
    }
  ],
  "summary": "SQL string_trim removes only spaces, diverging from in-memory trimming in AshSql"
}