Skip to content
Access control Advisory Advanced CVE-2026-84358

Improper privilege management in Downloads (CVE-2026-84358)

On POSIX platforms the browser shares one open file description with renderers when building an MHTML archive, and a compromised renderer can clear the append flag on that shared description. It could then seek and write over content from other origins, and on Android Offline Pages this could let attacker HTML be shown under a victim site's URL in the address bar.

Google Chrome

Originally disclosed on Chrome VRP

  • Fix shipped in 4 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. Please see https://chromium.googlesource.com/chromium/src/+/main/docs/security/ai-generated-security-bugs-faq.md for more information.

Overview: MHTML generation on POSIX platforms shares an Open File Description (OFD) between the browser and multiple renderers. A compromised renderer can potentially clear the shared O_APPEND flag via fcntl(F_SETFL), allowing it to overwrite data from other origins and spoof the final archive. This is particularly impactful on Android Offline Pages, where internal archives skip integrity checks, leading to persistent Omnibox URL spoofing.

Affected files:

  • content/browser/download/mhtml_generation_manager.cc
  • base/files/file_posix.cc
  • sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc
  • chrome/browser/offline_pages/offline_page_mhtml_archiver.cc
  • chrome/browser/offline_pages/offline_page_request_handler.cc

Estimated timestamp from git blame: 2026-04-01

Summary

On POSIX platforms (Linux, Android, macOS), the O_APPEND flag on an open file description (OFD) is shared between all file descriptors referring to it. In Chrome's MHTML generation, the browser process opens an output file with O_APPEND and then provides each renderer with a duplicated file descriptor via dup(). Because these FDs share the same OFD, a compromised renderer can clear the O_APPEND flag for the entire OFD using fcntl(F_SETFL, ...). This allows the renderer to use lseek and write to overwrite content written by other origins during the shared archival process.

Root Cause Analysis

In content/browser/download/mhtml_generation_manager.cc, the browser opens the MHTML output file using base::File::FLAG_APPEND. On POSIX, this results in the O_APPEND status flag being set on the Open File Description.

When the browser calls browser_file_.Duplicate() to send the handle to a renderer, it calls dup(), creating a new FD pointing to the same OFD. On Linux and Android, the renderer's seccomp-bpf sandbox permits the modification of O_APPEND via fcntl:

C++
// sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc
const uint64_t kAllowedMask = O_ACCMODE | O_APPEND | O_NONBLOCK | O_SYNC | ...;
// ...
.Case(F_SETFL,
      If((long_arg & ~kAllowedMask) == 0, Allow()).Else(CrashSIGSYS()))

A compromised renderer can potentially call fcntl(fd, F_SETFL, 0) to clear O_APPEND. It can then use lseek(fd, 0, SEEK_SET) to move the shared file offset to the beginning and overwrite the archive with malicious content. The Android renderer sandbox also permits ftruncate(), which can be used to erase subsequent legitimate data.

Potential Impact: Android Offline Pages URL Spoofing

This vulnerability is most critical for the Android Offline Pages feature. When a page is archived, the browser records the main frame's URL and the file's SHA256 digest in a local database. Because archives in internal directories are considered trusted, OfflinePageRequestHandler skips the integrity validation (digest check) when serving them later.

By overwriting the archive during the generation phase, a compromised renderer for a cross-origin subframe can inject malicious HTML that will be associated with the victim main frame's URL. When the user later opens the offline page, Chrome will display the victim's URL in the Omnibox while rendering the attacker's content.

Suggested Reproductions Steps (Potential)

  1. Compromise a renderer process for a cross-origin iframe (e.g., via a V8 exploit).
  2. Trigger a page save (e.g., 'Download' in Android Chrome) for a site embedding that iframe.
  3. In the compromised renderer, wait for the MHTML file handle.
  4. Execute: fcntl(fd, F_SETFL, 0); lseek(fd, 0, SEEK_SET); write(fd, malicious_data, len); ftruncate(fd, len);.
  5. Wait for the browser to finalize the archive.
  6. Access the saved offline page to observe the URL spoof.

Suggested Fix

To prevent this escalation, the browser should avoid sharing the same Open File Description with multiple renderers if O_APPEND is the only intended protection. Possible solutions include:

  1. Platform-specific hardening: On Windows, the kernel enforces FILE_APPEND_DATA permissions. On POSIX, consider using a pipe to receive data from renderers and having the browser perform the writes.
  2. Verify file integrity: Ensure that even internal archives undergo mandatory digest validation before being served to the user in OfflinePageRequestHandler.

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.

The original report as published on the Chromium issue tracker. Images and videos are our own copies; raw HTML is shown as text. View it on Chromium issue tracker.

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 browser hands renderers a duplicated descriptor that shares one open file description with the append flag, and the renderer sandbox allows fcntl to change that flag.

Impact

A compromised renderer could overwrite archive data from other origins, and on Android Offline Pages this could show attacker content under a victim URL in the Omnibox, though the report is a potential issue and the steps are only suggested.

What the attacker needed

A compromised renderer process; user triggers a page save; Android Offline Pages for the spoof

The fix

The browser should stop sharing one open file description with renderers, for example by receiving data through a pipe and writing it itself, and internal archives should always have their digest checked before being served.

How it was found

  1. Compromise a renderer process for a cross-origin iframe.
  2. Trigger a page save for a site embedding that iframe.
  3. In the compromised renderer, wait for the MHTML file handle.
  4. Clear the append flag, seek to the start and overwrite the file.
  5. Wait for the browser to finalise the archive.
  6. Open the saved offline page to observe the URL spoof.

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.

When Chrome saves a page as a single archive file, several parts of the browser write into the same file. On Linux and Android, a file opened in append mode has a setting that forces every write to go to the end, and that setting is shared by everyone holding the file. The report says a hacked part of the browser could switch that setting off and write wherever it likes, so the saved page could contain content the user did not expect.

What is Access control?

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.

More from Google Chrome

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.