Skip to content
XSS Disclosed report Intermediate CVE-2026-2790

double encoded Null (%2500) in jar: url can still be used to make us misinterpret a file's MIME type

Firefox's handling of jar: URLs inconsistently decodes and normalises filenames, allowing a crafted ZIP entry with a percent-encoded null byte to be displayed as a benign filename while executing attacker-controlled HTML/JavaScript. An attacker could achieve script execution, for example via a malicious extension that packages such a resource.

Surya Dev Singh Follow

Originally disclosed on Mozilla

  • Fixed in 10 days
  • Paid in 18 days
  • Disclosed after 10 days

Created attachment 9535462 test.zip

Summary

A bypass of the fix for Bug 1940027 (CVE-2025-1936) exists in Firefox’s handling of jar: URLs due to inconsistent percent-decoding and filename normalization of archive entries. By crafting a ZIP/JAR file containing an entry with a literal percent-encoded null byte sequence (%00) in the filename and accessing it via a double-encoded jar: URL, an attacker can cause Firefox to execute attacker- controlled HTML/JavaScript content while the filename appears benign in the UI.

Steps to Reproduce

  1. Create a ZIP/JAR archive containing a file whose name includes a literal percent-encoded null byte sequence (%00) and whose contents are valid HTML.

    Example Python script:

    Python
    import zipfile
    
    with zipfile.ZipFile("test.zip", "w") as z:
        z.writestr("test.png%00", """
        <html>
          <body>
            <script>alert(1)</script>
          </body>
        </html>
        """)
    

2 . Open Firefox and navigate to the archive using the jar: protocol:

Shell
jar:file:///C:/Users/<user>/Desktop/test.zip!/

3 . Observe that Firefox lists the archive contents and displays the entry test.png%00 as test.png in the UI.

4 . Now navigate to

jar:file:///C:/Users/<user>/Desktop/test.zip!/test.png%2500

5 . observe that the javascript code inside test.png (rendered in UI) file is executed.

Impact

This issue allows script execution due to inconsistent percent-decoding and filename normalization when resolving jar: URLs. Firefox displays a normalized filename in the archive listing while resolving the raw, decoded filename during resource fetching, allowing crafted archive entries to bypass expected content handling.

The most realistic abuse scenario is similar to Bug 1940027 (CVE-2025-1936): a malicious extension could package a crafted JAR/ZIP resource containing a misleading filename that appears benign during review, but results in script execution at runtime.

The original report as published on Mozilla's Bugzilla, by Surya Dev Singh. Images and videos are our own copies; raw HTML is shown as text. View it on Mozilla's Bugzilla.

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 inconsistent percent-decoding and filename normalisation between the archive listing and resource fetching in jar: URL resolution.

Impact

This could allow script execution, with the most realistic abuse being a malicious extension that packages a crafted resource with a misleading filename.

What the attacker needed

Firefox browser; Crafted ZIP/JAR archive; User opens the jar: URL

How it was found

  1. Create a ZIP/JAR archive containing a file whose name includes a literal percent-encoded null byte sequence and whose contents are valid HTML.
  2. Open Firefox and navigate to the archive using the jar: protocol.
  3. Observe that Firefox lists the archive contents and displays the entry as a benign filename in the UI.
  4. Navigate to the double-encoded jar: URL for that entry.
  5. Observe that the JavaScript code inside the file is executed.

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 jar: URL lets Firefox look inside a ZIP file as if it were a folder. The bug is that Firefox shows one filename in the list but actually opens a different file when you click it, so a file that looks like an image can really be a script. This means a malicious add-on could hide harmful code behind a harmless-looking name.

What is XSS?

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

More by Surya Dev Singh

View all

4 more disclosed reports, best first.

More from Mozilla

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.