Visiting youtube.com. (trailing dot) on Windows breaks IndexedDB for all sites and extensions
Visiting a YouTube URL with a trailing dot on Windows causes Firefox to create a storage folder with a trailing dot, which Windows cannot handle. This leads to a persistent denial of service where IndexedDB fails for all websites and extensions.
Originally disclosed on Mozilla
- Fixed in 15 days
- Paid in 3 months
- Disclosed after 15 days
Created attachment 9156858 firefox localstorage log.txt
This is just a denial of service—but once activated, it stops IndexedDB in all extensions and websites, and persist across restarts. This was discovered by accident, after reading a reminder on Reddit about FQDNs.
Steps to reproduce:
- Visit https://www.youtube.com./ The trailing dot is required. So is the https, but only because of the way they redirect.
- Wait a few seconds, for the page to load and cache to persist to disk, etc.
3a. IndexedDB will not work on any other website. For example, https://codepen.io/GlennAxworthy/pen/NppRXa will show no rows (instead of two), and the Add button will not work. 3b. IndexedDB will not work in any extension. For example, log into Bitwarden (if you can), and your vault will show as empty (even if it should not be!). Try a manual sync, and the vault will remain apparently empty, and the date of last sync will still say that it has never synced.
Presumably it is the initial indexedDB.open() call which fails in the JavaScript, not a later one.
The denial of service aspect, of course, would come from tricking a user into visiting a link like in step 1.
** Underlying cause: **
Visiting the website creates the following folder:
C:\Users\Username\AppData\Roaming\Mozilla\Firefox\Profiles\profilename\storage\default\https+++www.youtube.com.
(The trailing dot above is literal, not a full stop.)
However, Win32 is kinda well known (see e.g. https://superuser.com/questions/230385/dots-at-the-end-of-file-name/1533170#1533170) to not allow trailing dots. This can be directly observed by the fact Windows Explorer will struggle to browse, delete, or rename the guilty the folder. Similarly, PowerShell struggles as well; the Linux layer WSL can handle it, however.
Creating the folder with the trailing dot probably required Firefox to use the special path prefix "\?", which bypasses some Win32 restrictions.
Anyway, in Firefox, the existence of this folder causes NS_ERROR_FILE_ACCESS_DENIED, which causes the IndexedDB methods to fail. See the logs.
** More information: **
This error persists if you restart Firefox. Nor does clearing the cache etc (Ctrl+Shift+Delete) necessarily fix it. We are not certain, but it might be that clearing the cache etc fixes it before you restart Firefox, but not after you restart Firefox.
Separately, for comparison, I see that in bug #1624586 (and its dupes), there is also some discussion of folders with trailing dots. To be clear, I think this issue we are raising here is new compared to that other bug. In the very least, this issue is 100% reproducible, whereas the cause of the other bug is unexplained. Moreover, I think that here the folder is 'ACCESS_DENIED' which breaks IndexedDB, whereas in the other bug the folders were 'unexpected' which messes up LocalStorage.
** Supporting log: **
The JavaScript console shows the following error (e.g. from the Bitwarden extension):
UnknownError: The operation failed for reasons unrelated to the database itself and not covered by any other error code. ExtensionStorageIDB.jsm:831 normalizeStorageError resource://gre/modules/ExtensionStorageIDB.jsm:831 method chrome://extensions/content/child/ext-storage.js:273 AsyncFunctionThrow self-hosted:697
A Firefox debug log is also attached, from visiting the above codepen page. But, in essence, that JS error above corresponds to this native errors:
[Parent 12072, QuotaManager IO] WARNING: NS_ENSURE_SUCCESS(rv, rv) failed with result 0x80520015 (NS_ERROR_FILE_ACCESS_DENIED): file /builds/worker/checkouts/gecko/storage/mozStorageService.cpp, line 638 [...] [Parent 12072, IPDL Background] WARNING: Converting non-IndexedDB error code (0x80520015) to NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR: file /builds/worker/checkouts/gecko/dom/indexedDB/ActorsParent.cpp, line 561
Versions:
Operating system: Windows 10 (2004). We suspect this reproduces on many other versions of Windows. Firefox: v77.0.1 (x64); Nightly v78.0b (x64)
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely Firefox used a special path prefix to bypass Windows restrictions and created a storage folder with a trailing dot, which later caused file access errors.
Impact
An attacker could trick a user into visiting a link to cause a persistent denial of service, breaking IndexedDB for all websites and extensions until the problematic folder is manually removed.
What the attacker needed
Windows operating system; Firefox browser; victim visits a crafted link
How it was found
- Visit the YouTube URL with a trailing dot.
- Wait for the page to load and cache to persist to disk.
- Observe that IndexedDB fails on other websites and in extensions.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
IndexedDB is a browser database that websites and extensions use to store data locally. On Windows, file and folder names cannot end with a dot, but Firefox created such a folder after visiting a specially formed YouTube address. Because that folder cannot be accessed properly, the database stops working everywhere until the folder is removed.
What is DoS?
A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.