SQLite versions before 3.54.0 that are built with FTS3/FTS4 and SQLITE_ENABLE_FTS3_PARENTHESIS contain a use-after-free vulnerability in the fts3BestSnippet() function. This flaw is triggered by dangling cached position-list pointers when running a full-text MATCH query combining OR and NEAR operators with snippet(), potentially allowing reading of freed heap memory and causing a process crash. The vulnerability is fixed in version 3.54.0.