Insufficient validation of untrusted input in Base (CVE-2026-11047)
A compromised MediaFoundation CDM utility process can create an NTFS junction in its storage directory. When the user clears browsing data, the browser process follows the junction and recursively deletes the target directory's contents.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 2 months
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 without the security team.
Overview: A compromised MediaFoundation CDM LPAC utility process can create an NTFS junction in its storage directory. When browsing data is cleared, a logic flaw in Windows base::DeletePathRecursively causes the browser process to follow the junction, recursively deleting the targeted directory's contents.
Affected files:
chrome/browser/media/cdm_document_service_impl.ccbase/files/file_util_win.ccbase/files/file_enumerator_win.cc
Estimated timestamp from git blame: 2024-12-27
Summary
A potential vulnerability exists in the MediaFoundation CDM data deletion logic. A compromised utility process can trigger an arbitrary recursive directory deletion executed by the browser process. By placing an NTFS junction in its storage directory, the utility process can redirect a cleanup task to any directory the user has permissions to delete.
Vulnerability Details
-
Privileged File Access in LPAC: The MediaFoundation CDM utility process runs in an LPAC (Less Privileged AppContainer) sandbox on Windows. In
cdm_document_service_impl.cc,CreateCdmStorePathRootAndGrantAccessIfNeededgrants the LPAC SIDFILE_GENERIC_WRITEandDELETEpermissions (with inheritance) on its storage directory:<profile>/MediaFoundationCdmStore/<arch>. -
Junction Creation: Because
FILE_GENERIC_WRITEincludesFILE_WRITE_DATA, the compromised utility process can create an NTFS mount-point (junction) within its storage directory pointing to an arbitrary target directory (e.g., the Chrome User Data directory). Note that creating junctions on Windows requires write access to the directory, but does not require the restrictedSeCreateSymbolicLinkPrivilege. -
Insecure Deletion Trigger: When a user clears their browsing data (e.g., via "Cookies and other site data" in Settings),
ChromeBrowsingDataRemoverDelegate::RemoveEmbedderDataposts a task toDeleteMediaFoundationCdmDatain the browser process. -
Orphaned Folder Deletion: In
cdm_document_service_impl.cc,DeleteMediaFoundationCdmDataenumerates subdirectories of the CDM store. If a subdirectory name (e.g., the attacker's junction namedevil) is not found in theorigin_id_mappingfrom preferences, it immediately callsbase::DeletePathRecursively(file_path)to clean up what it assumes is orphaned data. -
Bypassing Reparse Point Checks in
base::DeletePathRecursively: The Windows implementation ofbase::DeletePathRecursively(inbase/files/file_util_win.cc) is vulnerable to following directory junctions:DoDeleteFilechecksGetFileAttributesbut only verifiesFILE_ATTRIBUTE_DIRECTORY, ignoringFILE_ATTRIBUTE_REPARSE_POINT.- It then calls the internal helper
DeleteFileRecursive, which usesbase::FileEnumeratorwith its constructor parameterrecursive=false. base::FileEnumeratoronly skips reparse points when its internalrecursive_flag istrue. Since it is initialized tofalsehere, it returns the contents of the target directory whenFindFirstFileExis called on the junction wildcard.DeleteFileRecursivemanually recurses over the returned entries. The browser process then proceeds to recursively delete every file and subdirectory in the target tree using the user's full privileges.- Finally,
DoDeleteFileremoves the junction itself.
Impact
A compromised MediaFoundation utility process can achieve a partial sandbox escape, allowing an attacker to delete any file or directory the user has write/delete access to. This results in permanent data loss (e.g., wiping the entire Chrome profile or the user's Documents folder).
Suggested Reproduction Steps
Note: These are potential steps to trigger the vulnerability. Our tooling agent does not run code to verify them.
- Compromise the MediaFoundation LPAC utility process (precondition).
- Call
CdmDocumentService::GetMediaFoundationCdmData()via Mojo to ensure the storage path exists and appropriate ACEs are applied. - In the LPAC process, create a directory at
<profile>/MediaFoundationCdmStore/<arch>/evil. - Set a reparse point on the
evildirectory (IO_REPARSE_TAG_MOUNT_POINT) targeting an arbitrary user directory (e.g.,C:\Users\<user>\Documents). - Wait for the user to trigger a "Clear browsing data" action for "Cookies and other site data" in Chrome's Settings.
- Observe that the browser process follows the junction and recursively deletes the contents of the targeted directory.
Suggested Fix
Modify DeleteFileRecursive in base/files/file_util_win.cc to explicitly check for and skip reparse points.
Before recursing or deleting contents, check if the current directory is a reparse point:
DWORD attributes = ::GetFileAttributes(path.value().c_str());
if (attributes != INVALID_FILE_ATTRIBUTES && (attributes & FILE_ATTRIBUTE_REPARSE_POINT)) {
return ::RemoveDirectory(path.value().c_str()) ? ERROR_SUCCESS : ReturnLastErrorOrSuccessOnNotFound();
}
Alternatively, base::FileEnumerator's logic could be updated to ensure that Next() always skips reparse points unless explicitly requested, preventing accidental traversal during manual recursion.
Evaluated with Chrome root at commit: ff3d2b74fa39431785bd60e51463b08fcc71ee33
Results so far have been promising, but there can be wrong deductions. If this proves to be a false positive, please close as WAI; 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.
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 the recursive deletion function does not check for reparse points (junctions) before recursing, so it follows a junction created by a less privileged process.
Impact
A compromised MediaFoundation utility process can achieve a partial sandbox escape, allowing an attacker to delete any file or directory the user has write/delete access to, resulting in permanent data loss.
What the attacker needed
Compromised MediaFoundation utility process; user clears browsing data
The fix
The recursive deletion function should be modified to explicitly check for and skip reparse points before recursing or deleting contents.
How it was found
- Compromise the MediaFoundation LPAC utility process.
- Call CdmDocumentService::GetMediaFoundationCdmData() via Mojo to ensure the storage path exists and appropriate ACEs are applied.
- In the LPAC process, create a directory at <profile>/MediaFoundationCdmStore/<arch>/evil.
- Set a reparse point on the evil directory targeting an arbitrary user directory.
- Wait for the user to trigger a 'Clear browsing data' action for 'Cookies and other site data' in Chrome's Settings.
- Observe that the browser process follows the junction and recursively deletes the contents of the targeted directory.
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.
A sandboxed helper process for media playback can create a special folder link (a junction) that points to another folder. When the user clears browsing data, the main browser process mistakenly follows that link and deletes everything in the target folder, which could be the user's documents.
What is Path traversal?
Input that builds a file path escapes the intended folder, reading or writing files the application should never touch.