Android security tags, read closely by Lightrion

CVE-2026-28622 AI-generated analysis

platform/packages/providers/MediaProvider, MediaProvider query builder (geolocation metadata filtering)

AI-generated: written from the bulletin and the fixing diffs by claude-fable-5-1, then checked against the code by claude-opus-5-5 (4 corrections). Verify against the commit before relying on it.

MediaProvider now returns an empty result whenever latitude/longitude columns appear in the SQL selection, GROUP BY or HAVING clause (regardless of whether a sort order is also present), and neutralizes those columns in the sort order with a case-insensitive, word-bounded replacement instead of a case-sensitive substring replace.

Root cause

In src/com/android/providers/media/MediaProvider.java, the query-builder method (the one that ends with `return qb;` after the owner-package filtering) computed `filterClauses = getClausesForFilteringGeolocationData(extras, type)` and then used an if/else. If the list contained QUERY_ARG_SQL_SORT_ORDER, the code only rewrote the sort string. Otherwise it appended `FALSE` to the WHERE clause. Because the sort-order branch took priority, a query that put latitude/longitude in the selection, GROUP BY or HAVING clause and also in the sort order was never blocked with `FALSE`, so the restricted columns could still be used to filter rows. The sort-order rewrite also used case-sensitive `String.contains`/`String.replace` with the LATITUDE/LONGITUDE constants, so other letter-case spellings (for example "LATITUDE", which the new tests exercise) would not be replaced with NULL.

How the fix works

Completeness

Behavior changes

Per major

Unknowns

Back to September 2026 · Findings