Skip to content
Smuggling / CRLF Advisory Advanced CVE-2026-11127

Inappropriate implementation in WebAPKs (CVE-2026-11127)

A sign-extension bug in Chrome's WebAPK ZIP parser causes 16-bit fields to be read as negative numbers, creating a parser differential with Android's libziparchive. An attacker could craft a WebAPK where Chrome hashes a legitimate payload while Android extracts a malicious one, potentially bypassing signature validation.

Google Chrome

Originally disclosed on Chrome VRP

  • Fix shipped in 54 days

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 Chrome Security team.

Overview: A sign-extension bug in Chrome's WebApkVerifySignature ZIP parser causes 16-bit fields to be evaluated as negative values if the high bit is set. This creates a parser differential with Android's libziparchive, potentially allowing an attacker to craft a WebAPK where Chrome hashes a legitimate payload while Android extracts a malicious one.

Affected files:

  • components/webapk/android/libs/client/src/org/chromium/components/webapk/lib/client/WebApkVerifySignature.java

Estimated timestamp from git blame: 2017-06-08

Root Cause

In components/webapk/android/libs/client/src/org/chromium/components/webapk/lib/client/WebApkVerifySignature.java, Chrome uses a custom ZIP parser to cryptographically hash WebAPK contents and verify their signatures. The parser uses a helper method, read2(), to read 16-bit fields from the ZIP structure:

Java
    private int read2() {
        return mBuffer.getShort();
    }

Java's short primitive is a signed 16-bit integer. When read2() encounters a raw value of 0x8000 or greater, it is interpreted as a negative number. Because read2() returns an int, this negative short is sign-extended into a negative integer (e.g., 0xFFFF becomes -1). Standard ZIP 16-bit length fields are unsigned.

Impact and Exploitation Scenario

This flaw creates a severe parser differential between Chrome's signature verification and Android's OS-level APK extraction (which uses the C++ libziparchive and correctly treats these fields as unsigned). An attacker could exploit this discrepancy to bypass WebAPK signature validation.

Potential Attack Scenario: Note: This is a theoretical attack sequence based on static code analysis; a live proof-of-concept has not been executed.

  1. An attacker crafts a malicious APK acting as a WebAPK.
  2. In the Local File Header (LFH) for a critical file, the attacker sets the 16-bit extraFieldLength field to 0xFFFF.
  3. When Chrome attempts to verify the WebAPK (WebApkValidator.verifyCommentSignedWebApk), it parses the LFH.
  4. Chrome reads extraFieldLength via read2(), which returns -1.
  5. Chrome calculates the data start offset using this negative value: block.mHeaderSize = 30 + fileNameLength + (-1).
  6. A standard unsigned parser (like Android's libziparchive) evaluates this as 30 + fileNameLength + 65535.
  7. This creates an exact 65536-byte discrepancy between where Chrome believes the file data begins and where Android believes it begins.
  8. Chrome's calculateHash() seeks to its calculated (earlier) offset and hashes the subsequent data. If the attacker places a "legitimate" WebAPK payload at this offset, Chrome validates the signature successfully.
  9. When Android installs the APK, libziparchive seeks to its calculated (later) offset and extracts the data. If the attacker places a "malicious" payload at this offset, Android installs the malicious code.
  10. The resulting installed app gains WebAPK privileges for the spoofed origin (e.g., launching without a URL bar, native URL handling) despite containing unauthorized code.

Recommended Fix

Update the read2() and read4() helper methods in WebApkVerifySignature.java to explicitly mask the return values, ensuring they are evaluated as unsigned integers:

Java
    private int read2() {
        return mBuffer.getShort() & 0xFFFF;
    }

    private long read4() {
        return mBuffer.getInt() & 0xFFFFFFFFL;
    }

(Note: If read4() is updated to return long, dependent variables and method signatures handling 32-bit ZIP fields must also be updated to long to prevent truncation.)

Evaluated with Chrome root at commit: 096fc8fdbfacf2546485756d03f160a3d04fcc9b


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.

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

The read2() helper returns a signed short, so values with the high bit set become negative and are sign-extended, whereas ZIP fields are unsigned.

Impact

An attacker could bypass WebAPK signature validation, causing Android to install malicious code that gains WebAPK privileges for a spoofed origin, though the attack is theoretical and no live proof-of-concept has been executed.

What the attacker needed

Attacker can craft a WebAPK; victim installs the crafted WebAPK

The fix

The read2() and read4() helper methods should be updated to mask return values with 0xFFFF and 0xFFFFFFFFL respectively, ensuring unsigned interpretation.

How it was found

  1. Craft a malicious APK acting as a WebAPK.
  2. Set the 16-bit extraFieldLength field in the Local File Header to 0xFFFF.
  3. Chrome parses the LFH and reads extraFieldLength via read2(), getting -1.
  4. Chrome calculates the data start offset using the negative value, while Android's libziparchive uses the unsigned value, creating a 65536-byte discrepancy.
  5. Place a legitimate payload at Chrome's calculated offset and a malicious payload at Android's offset.
  6. Chrome validates the signature on the legitimate payload, but Android installs the malicious payload.

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 checks the signature of a WebAPK (a special Android app that wraps a website), it reads the file's internal structure using its own code. A mistake in that code makes certain size fields appear negative, so Chrome and Android disagree about where file contents start. An attacker could exploit this to make Chrome check one harmless file while Android installs a different, malicious one.

What is Smuggling / CRLF?

A front end and a back end split one connection's bytes into requests differently, letting an attacker hide a request inside another user's.

More from Google Chrome

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Request smuggling and header injection

The lesson behind this report.

A front end and a back end split one connection's bytes into requests differently, letting an attacker hide a request inside another user's.