Skip to content
XSS Advisory Advanced CVE-2026-17818

Inappropriate implementation in Network (CVE-2026-17818)

Duplicate Content-Disposition headers are coalesced into a comma-separated string, which fails token validation and defaults the disposition to inline. An attacker could make a response intended for download render as HTML and execute scripts in the host origin.

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

Overview: A potential vulnerability exists where duplicate Content-Disposition headers are coalesced into a single comma-separated string by GetNormalizedHeader. This coalesced value fails token validation inside the parser, defaulting the disposition type to inline and allowing files intended for download to render and execute scripts in the host origin's context.

Affected files:

  • content/browser/loader/download_utils_impl.cc
  • components/download/internal/common/download_utils.cc
  • ios/web/navigation/crw_wk_navigation_handler.mm
  • net/http/http_content_disposition.cc
  • net/http/http_util.cc

Estimated timestamp from git blame: 2018-04-19

Description

A potential security bypass exists where duplicate Content-Disposition: attachment headers can cause Chromium to treat a forced download response as inline content, potentially leading to Cross-Site Scripting (XSS).

When the browser process receives multiple identical Content-Disposition headers, they are coalesced into a single comma-separated string by HttpResponseHeaders::GetNormalizedHeader because the "content-disposition" header is not classified as a non-coalescing header in net/http/http_util.cc. This results in the coalesced string value "attachment, attachment".

During parsing in HttpContentDisposition::ConsumeDispositionType (in net/http/http_content_disposition.cc), the presence of the comma character (,) causes the token check (HttpUtil::IsToken) to fail. Consequently, the parser fails to recognize the attachment directive, falls back to the default INLINE disposition type, and is_attachment() returns false.

Impacted Code Paths

  1. Browser Process Navigation Gate: In content/browser/loader/download_utils_impl.cc, MustDownload retrieves the content-disposition header using GetNormalizedHeader:

    C++
    std::string disposition =
        headers->GetNormalizedHeader("content-disposition")
            .value_or(std::string());
    

    If duplicate headers are present, this returns "attachment, attachment". When parsed, is_attachment() returns false, causing the browser process to bypass the forced download logic.

  2. Blink Renderer Navigation Safety Assertions: In third_party/blink/renderer/core/loader/frame_loader.cc (AssertCanNavigate), a safety assertion checks that the response is not an attachment:

    C++
    CHECK(!IsContentDispositionAttachment(
        params->response.HttpHeaderField(http_names::kContentDisposition)));
    

    During response initialization in WebURLResponse::Create, the renderer also coalesces duplicate header lines using commas (in ResourceResponse::AddHttpHeaderField). Therefore, the stored header is also "attachment, attachment", which evaluates as non-attachment. The renderer does not crash on the CHECK and renders the response.

  3. iOS Navigation Handler: On iOS, the identical coalescing and parsing pattern is used in ios/web/navigation/crw_wk_navigation_handler.mm (shouldRenderResponse:), leading to the same potential bypass.

Potential Reproduction Steps

Note: These steps are potential sequences based on static code analysis, as our tooling agent does not have the ability to run code.

  1. Set up an HTTP/1.1 server that responds to a request with duplicate identical Content-Disposition headers and user-controlled HTML:

    HTTP
    HTTP/1.1 200 OK
    Content-Type: text/html
    Content-Disposition: attachment
    Content-Disposition: attachment
    
    <script>alert(document.domain)</script>
    
  2. Navigate Chromium to this resource (e.g., http://example.com/uploads/evil.html).

  3. If the bypass is triggered, Chromium will render the HTML page inline instead of initiating a download, executing the script in the context of the host's origin.

Suggested Remediation

Add "content-disposition" to kNonCoalescingHeaders in net/http/http_util.cc. Since Content-Disposition is defined as a single-instance header under RFC 6266 and does not support comma-separated lists, coalescing should be explicitly disabled to prevent parsing failures.

Evaluated with Chrome root at commit: b1520ef4a76878853a31f0943b565e42060edec8


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 header 'content-disposition' is not listed as non-coalescing, so duplicate headers are merged with a comma, causing the parser to reject the attachment token and fall back to inline.

Impact

If the bypass is triggered, an attacker could execute script in the host origin, but the report notes these are potential steps from static analysis and not yet confirmed by running code.

What the attacker needed

Attacker controls HTTP response headers; victim navigates to attacker-controlled URL

The fix

Add 'content-disposition' to the list of non-coalescing headers so duplicate headers are not merged.

How it was found

  1. Set up an HTTP server that returns duplicate Content-Disposition headers and HTML content.
  2. Navigate Chromium to the resource.
  3. Observe whether the HTML renders inline and executes script instead of downloading.

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 a website tells the browser to download a file instead of showing it, it uses a header called Content-Disposition. If that header appears twice, the browser joins them with a comma, which confuses the parser and makes it treat the file as a normal web page. That means a malicious file could run code in the context of the website.

What is XSS?

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.

More from Google Chrome

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Cross-site scripting (XSS)

The lesson behind this report.

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.