Stagnant Microsoft Graph @odata.nextLink causes an unbounded sync request loop
Categories
(MailNews Core :: Networking: Exchange, defect, P3)
Tracking
(Not tracked)
People
(Reporter: tjddbdud1, Unassigned)
References
(Blocks 1 open bug)
Details
(Keywords: sec-low)
Attachments
(1 file)
|
37.22 KB,
application/x-zip-compressed
|
Details |
Summary
Thunderbird's Microsoft Graph delta synchronization immediately follows every successful server-controlled @odata.nextLink but does not verify that the continuation URL advances, keep a visited-link set, or enforce a page/time limit. A Graph-compatible or compromised account endpoint can repeatedly return the same same-origin continuation URL and keep mail synchronization in an unbounded authenticated request loop.
The attached local-only PoC invokes the actual shipping @mozilla.org/messenger/graph-client;1 component. Across three fresh processes, 1,000 repeated next-link pages caused exactly 1,001 requests in 1,001-1,017 ms. Three controls terminated after one request in 22-24 ms. All target responses were valid empty Graph delta pages, so message processing did not create the amplification.
Impact
The endpoint can prevent mail/folder/calendar synchronization from completing while continuously consuming client CPU, network connections, authentication/operation queue work, and remote-service capacity. The production loop has no bound; the PoC allows completion only to measure the exact request count safely.
Suggested severity: Moderate, CVSS 3.1 6.5 (AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H).
Suggested CWE: CWE-835 (Loop with Unreachable Exit Condition), CWE-400 (Uncontrolled Resource Consumption).
Affected code
Demonstrated message path:
rust/graph_xpcom/src/client/sync_messages_for_folder.rs:166-177
Same unguarded pattern:
rust/graph_xpcom/src/client/sync_folder_hierarchy.rs:108-119rust/graph_xpcom/src/client/sync_calendar_items.rs:101-112rust/ms_graph_tb/src/pagination.rs(NextPage)
Introduced in 7a586d1cedac8bc62d3113df7b1c817b48f871eb (Bug 2018994, 2026-03-25). Verified still present on current main (160.0a1), beta (159.0), release (158.0.1), and ESR 153 source. Dynamic test: official Thunderbird Daily 160.0a1 BuildID 20261016104433, current source checkout b73b6c419d08c583d9ac32ed9f79b080c17856b6.
Reproduction
- Extract the attached ZIP.
- Follow
README.mdand runrun.ps1with-TargetRepeats 1000using the official xpcshell/test packages and current Thunderbird source. - Observe
POC_RESULT:requestCount=1001,repeatedLinkRequests=1000,uniqueRequestedPaths=2, no operation error. - Run with
-Control; observe one request.
The PoC is loopback-only and uses synthetic empty responses. It does not contact Microsoft or any third party.
Recommended fix
Track canonical continuation URIs for each operation and reject immediate repeats and cycles; add a conservative page/time budget; surface a recoverable synchronization error without committing a new delta token. Add regression tests for both A -> A and A -> B -> A cycles across message, folder, and calendar delta sync.
Duplicate review
No exact match was found in the private submission ledger or public Bugzilla searches for Graph/@odata.nextLink/delta pagination. Bug 2083217 is a separate EWS SOAP SyncState issue in a different backend and implementation.
AI assistance was used for source review and drafting; all measurements were executed and verified locally with synthetic test data.
Comment 1•1 month ago
|
||
Not too much of a real sec issue (as MS wouldn't be doing that).
Comment 2•21 days ago
|
||
Similar to bug 2083217, I'm not sure what we'd even be checking for here. The server can trivially generate as many sync state tokens as it wants, why does it matter that those tokens can form a loop when there's already an infinite supply?
Updated•6 days ago
|
Updated•6 days ago
|
Description
•