CVE-2026-13976
Overview
Files Changed
DEPSthird_party/sqlite/README.chromiumthird_party/sqlite/src
Patch
From 231cc793db6fc3ddb7912786833e2805067b2e98 Mon Sep 17 00:00:00 2001 From: Greg Thompson <[email protected]> Date: Thu, 21 May 2026 06:25:31 -0700 Subject: [PATCH] Roll src/third_party/sqlite/src/ 331687ada..fc121d7d0 (1 commit) https://chromium.googlesource.com/chromium/deps/sqlite.git/+log/331687adab70..fc121d7d03cd $ git log 331687ada..fc121d7d0 --date=short --no-merges --format='%ad %ae %s' 2026-05-20 grt Early detection of attempts to overwrite an in-use cache page due to database corruption. [https://issues.chromium.org/issues/513858286|Chromium 513858286]. Created with: roll-dep src/third_party/sqlite/src Bug: 513858286 Change-Id: Ic5c24a793647001fcacc87613bb0e0867dcec36f Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7867591 Reviewed-by: Etienne Bergeron <[email protected]> Commit-Queue: Etienne Bergeron <[email protected]> Auto-Submit: Greg Thompson <[email protected]> Cr-Commit-Position: refs/heads/main@{#1634220} --- diff --git a/DEPS b/DEPS index 51f8afa..4745cc7 100644 --- a/DEPS +++ b/DEPS @@ -2920,7 +2920,7 @@ Var('chromium_git') + '/external/github.com/google/snappy.git' + '@' + '32ded457c0b1fe78ceb8397632c416568d6714a0', 'src/third_party/sqlite/src': - Var('chromium_git') + '/chromium/deps/sqlite.git' + '@' + '331687adab70f51f05a30112a3a22a71bec39cee', + Var('chromium_git') + '/chromium/deps/sqlite.git' + '@' + 'fc121d7d03cd6cbf499ec06a5112b263471b1181', 'src/third_party/sqlite4java/cipd': { 'packages': [ diff --git a/third_party/sqlite/README.chromium b/third_party/sqlite/README.chromium index 540211a..ce09f635 100644 --- a/third_party/sqlite/README.chromium +++ b/third_party/sqlite/README.chromium @@ -1,6 +1,6 @@ Name: sqlite URL: https://github.com/sqlite/sqlite -Revision: 331687adab70f51f05a30112a3a22a71bec39cee +Revision: fc121d7d03cd6cbf499ec06a5112b263471b1181 Update Mechanism: Manual Version: 3.53.1 CPEPrefix: cpe:/a:sqlite:sqlite:3.53.1 diff --git a/third_party/sqlite/src b/third_party/sqlite/src index 331687a..fc121d7 160000 --- a/third_party/sqlite/src +++ b/third_party/sqlite/src @@ -1 +1 @@ -Subproject commit 331687adab70f51f05a30112a3a22a71bec39cee +Subproject commit fc121d7d03cd6cbf499ec06a5112b263471b1181
Original Bug Report
Potential Sandbox Escape via missing SQLite corruption guard in IndexedDB
Project Fortify, an experimental security project, has identified the following potential security issue. If you’re a feature owner CC-ed on this bug, please do your best to review these reports. Please see https://chromium.googlesource.com/chromium/src/+/main/docs/security/ai-generated-security-bugs-faq.md for more information.
Overview: A missing corruption check in SQLite’s accessPayload function allows a compromised renderer to overwrite arbitrary cached b-tree pages in the browser process. This is reachable via the IndexedDB SQLite backend during blob write operations. This potential memory corruption can lead to remote code execution in the unsandboxed browser process.
Affected files:
third_party/sqlite/src/src/btree.ccontent/browser/indexed_db/instance/sqlite/database_connection.cccontent/browser/indexed_db/instance/sqlite/blob_writer.ccsql/streaming_blob_handle.ccthird_party/sqlite/src/src/vdbeblob.c
Estimated timestamp from git blame: Unknown (Google3 checkout)
Summary
A potential vulnerability exists in SQLite’s B-tree implementation where the accessPayload function, specifically in write mode (eOp=1), fails to perform corruption checks before writing to overflow pages. This lack of validation allows for a scenario where a malicious overflow chain link can alias an existing, initialized b-tree page, leading to its overwrite. In Chromium, this is reachable from a compromised renderer via the IndexedDB SQLite backend, potentially resulting in a sandbox escape.
Root Cause Analysis
The issue resides in third_party/sqlite/src/src/btree.c. When accessPayload() is called with eOp=1 to write data to an overflow chain, it fetches pages using sqlite3PagerGet() but fails to verify their state:
// btree.c:5289
rc = sqlite3PagerGet(pBt->pPager, nextPage, &pDbPage,
(eOp==0 ? PAGER_GET_READONLY : 0)
);
if( rc==SQLITE_OK ){
aPayload = sqlite3PagerGetData(pDbPage);
nextPage = get4byte(aPayload);
rc = copyPayload(&aPayload[offset+4], pBuf, a, eOp, pDbPage); // eOp==1 triggers write
sqlite3PagerUnref(pDbPage);
offset = 0;
}
In contrast, other write paths like btreeOverwriteOverflowCell explicitly check for corruption using the page’s reference count and initialization status (around line 9322):
if( sqlite3PagerPageRefcount(pPage->pDbPage)!=1 || pPage->isInit ){
rc = SQLITE_CORRUPT_PAGE(pPage);
}
Because accessPayload lacks this guard, it will write caller-supplied bytes into any page identified by nextPage. If a database is corrupted such that an overflow link points to a page currently initialized as a b-tree node by another active cursor, accessPayload will overwrite it without error.
Reachability in Chromium
This path is reachable from a compromised renderer through the IndexedDB SQLite backend (currently active under the IdbSqliteOnDiskRollout field trial):
- Renderer Activity: A compromised renderer initiates an IndexedDB
put()with a large Blob. - Mojo Data Stream: The browser process’s
BlobWriter(incontent/browser/indexed_db/instance/sqlite/blob_writer.cc) receives the data and uses asql::StreamingBlobHandleto perform the write. - SQLite Blob Write: This triggers
sqlite3_blob_write(), which invokessqlite3BtreePutData()and subsequentlyaccessPayload(eOp=1)in the browser process. - Aliased Overwrite: If the database file is crafted to alias an overflow page with a metadata page currently pinned by another IndexedDB cursor (on a different table),
accessPayloadwill overwrite that page’s contents while the other cursor still treats it as a valid, trusted b-tree node.
Potential Exploitation Path
An attacker could potentially follow these steps:
- Compromise a renderer process.
- Provide or trigger the creation of a corrupted IndexedDB database file where a Blob overflow chain points to a b-tree leaf page of a sensitive table.
- Open a cursor on the sensitive table to ensure the target page is cached and initialized in the browser process.
- Write to the malicious Blob via the Mojo
BlobWriterinterface. This overwrites the cached b-tree page while leaving itsMemPagemetadata (cell counts, offsets) in a stale but “valid” state. - Continue the sensitive cursor operation. SQLite will parse the attacker-controlled data using the stale metadata, leading to heap out-of-bounds primitives or type confusion in the unsandboxed browser process.
Note: These are suggested steps based on source code analysis; a functional proof-of-concept has not been executed.
Suggested Fix
The accessPayload function should be updated to include the same corruption guards as btreeOverwriteOverflowCell. Specifically, when eOp is non-zero, the code should verify that the fetched page is not already initialized (!pPage->isInit) and that its pager reference count is exactly 1.
Evaluated with Chrome root at commit: 1a8d40fc44df2088d5945c0bf53584038aa1614a
Results so far have been promising, but there can be wrong deductions. Feel free to adjust as follows:
- If you are familiar with the severity guidelines, you may adjust the severity.
- If this is a false positive, and there’s no work to be done, please close as WAI.
- If there is work to do here but not a vulnerability, please change the issue type to Task/Bug/FR.
Data from false positives will be used to improve accuracy over time. And please feel free to reach out to me directly if you have concerns or feedback on the project.