In SQLite through 3.31.1, the ALTER TABLE implementation has a use-after-free, as demonstrated by an ORDER BY clause that belongs to a compound SELECT statement.
"https://github.com/microsoft/AzureLinuxVulnerabilityData/blob/main/osv/AZL-38947.json"