Skip to content
Crypto Disclosed report Advanced CVE-2026-74942

Firefox Remote Settings content-signature bypass

Firefox's Remote Settings client wrote downloaded records into its local database before checking the collection's content signature, and only undid that write when the signature check failed with one specific error type. An attacker who controlled the Remote Settings response could deliberately trigger a different verification error, leaving unverified records such as blocklist or certificate-revocation entries in place and served to the browser.

Gal Ankonina Follow

Originally disclosed on Mozilla

  • Fixed in 7 days
  • Paid in 2 months
  • Disclosed after 7 days

Created attachment 9613888 poc-attachments.zip

Summary

Firefox's Remote Settings client persists unverified records to the local database before verifying the collection's content signature, and only rolls them back when the failure is an InvalidSignatureError. An attacker who controls a Remote Settings response (a compromised Remote Settings server/CDN, or an on-path attacker able to intercept the TLS connection to firefox.settings.services.mozilla.com — the exact threat content-signature exists to defend against) can force a different verification error (a malformed signature, or a failing x5u cert-chain fetch), which skips the rollback. The unverified attacker records remain in IndexedDB and are served to consumers via the default read path. This is a bypass of the content-signature integrity mitigation for the channel that ships add-on/gfx blocklists, the OneCRL certificate-revocation store, and remote configuration to the entire release population.

Impact

Content signature is the trust anchor that lets Firefox accept Remote Settings data without trusting the server — so a compromised RS server/CDN cannot push malicious data. This bug nullifies that guarantee: an attacker in control of the response can inject unverified records (e.g. remove a OneCRL entry to un-revoke a malicious intermediate certificate, remove an add-on/plugin blocklist entry, or push attacker-chosen remote config) and have them accepted and served to clients. Injected data is cleaned on the next honest sync (the real signature fails over the merged set) but persists for the duration of the attacker's control of the channel, and indefinitely under continued interception (the up-to-date-skip path, remote-settings.sys.mjs:778, does not re-verify once attacker metadata is stored).

Affected versions

Current mozilla-central HEAD 446c6e60 (2026-07-16) and, by inspection, all shipping branches — the _importChanges error handling is long-standing. Firefox desktop + Android + iOS use the same services/settings client.

The bug (source, verified at 446c6e60)

  1. Write before verify. RemoteSettingsClient.sys.mjs:1210 — db.importChanges(metadata, remoteTimestamp, remoteRecords, { clear: retry }); on the first attempt retry === false, so clear:false merges the attacker's records into IndexedDB before any verification.
  2. Verify after write. :1218-1224 — validateCollectionSignature(newRecords, remoteTimestamp, metadata) runs on the already-persisted data.
  3. Rollback gated on one error type. :1229 — if (!(e instanceof InvalidSignatureError)) throw e; re-throws without db.clear()/restore; the cleanup at :1244-1273 is reachable only for InvalidSignatureError.
  4. Only a well-formed-but-wrong signature is InvalidSignatureError. validateCollectionSignature:1102-1122 produces InvalidSignatureError only on the verifier's resolve-false path. A malformed signature, or a failing Utils.fetch(x5u) (:1099, no scheme/host allowlist), makes asyncVerifyContentSignature reject.
  5. The verifier rejects (not resolve-false) on malformed input. ContentSignatureVerifier.cpp:128-131 maps only NS_ERROR_INVALID_SIGNATURE → NS_OK (→ resolve false, the safe path); every other failure returns the raw error → CallCallback (:143) rejects → the JS await throws a non-InvalidSignatureError → step 3 re-throws without cleanup. The attacker fully controls the changeset JSON (only truthiness of x5u/signature is checked, :1093), so they can deliberately choose a malformed signature to take this branch.
  6. Served without re-verification. get() defaults verifySignature:false (:457) and the read-time re-check is double-gated this.verifySignature && verifySignature (:615); get() returns db.list() straight from IndexedDB (:570). No production consumer passes verifySignature:true, so the sync-time gate (the one with the hole) is the only enforcement.

Reproduction — REPRODUCED END-TO-END on Firefox (not source-analysis)

Ran against a Firefox Nightly artifact build at 446c6e60 via the attached xpcshell test (test_content_signature_reject_persist.js, drop-in to services/settings/test/unit/). Serve, from the Remote Settings endpoint (compromised server/CDN or TLS MITM), a changeset with attacker records and metadata.signatures = [{ x5u: <valid Mozilla chain>, signature: "AAAA" }] — "AAAA" is a cleanly-formed base64 value that decodes to 3 bytes (odd length), which the real NSS verifier rejects at ContentSignatureVerifier.cpp:355 (rawSignatureItem.len % 2 != 0 → NS_ERROR_FAILURE), i.e. a reject, not InvalidSignatureError.

Observed at HEAD (unpatched): sync error: NS_ERROR_FAILURE (confirming the non-InvalidSignatureError path); then RemoteSettings("<collection>").get() → ["cliff-inert-attacker-record"] — the unverified attacker record is served. With the attached patch: the same test → get() → [] (record cleared). The test therefore fails at HEAD and passes with the fix — it is a ready-to-land regression test. (A malformed-base64 signature, or an x5u returning non-PEM content, are additional triggers of the same reject path.)

Fix

Minimal (attached patch rs-content-sig-rollback.patch): roll back on any verification failure, not just InvalidSignatureError — remove the early if (!(e instanceof InvalidSignatureError)) throw e; and let the existing clear/restore logic run for all errors (guarding the local-data re-check so it can't itself re-introduce the gap). Verified to apply cleanly at 446c6e60; the valid-signature and InvalidSignatureError paths are unchanged. Structural (recommended): verify the candidate records before db.importChanges, matching the already-correct pullStartupBundle pattern (remote-settings.sys.mjs:303-324), so unverified bytes are never written. Additionally, add an https-scheme + Mozilla-host allowlist on x5u (:1099) to remove the fetch-failure reject trigger and the associated SSRF/privacy surface.

Severity note for the committee (mitigation bypass; precondition acknowledged)

We want to be upfront about the precondition and let the impact speak for itself. Precondition: the attacker must control the Remote Settings response for the targeted client — a compromised Remote Settings server/CDN, or an on-path/TLS-MITM position against firefox.settings.services.mozilla.com. We are not claiming a no-precondition, normal-browsing compromise.

Why it still matters, despite the precondition: content-signature verification is the security mitigation that exists specifically to make that precondition survivable — the entire design goal is that Firefox accepts Remote Settings data without trusting the server, so that a compromised server or on-path attacker cannot push malicious data. This report is a bypass of that exact mitigation. Concretely, an attacker who has reached the precondition can:

  • Un-revoke a malicious/mis-issued intermediate CA by dropping its OneCRL entry — directly re-enabling the certificate compromise that OneCRL was pushed to contain; and/or
  • remove an add-on/plugin/gfx blocklist entry, or push attacker-chosen remote configuration,

all served to the client as if trusted. So while the entry is gated on controlling the channel, the consequence is defeat of the fleet's second line of defense for exactly that scenario.

We think this fits the exploit-mitigation-bypass eligibility category (and its bounty modifier) regardless of the raw severity number, and we'd argue for sec-high on the OneCRL-un-revocation impact — but we defer to the committee's rating and are happy to provide the xpcshell PoC, the debug transcript (attached), and to coordinate a disclosure date. If a related report already exists internally, please treat this as an independent, source-verified confirmation with a ready-to-land fix + regression test.

AI-assistance disclosure

This issue was identified and validated with substantial AI assistance (Anthropic Claude / Claude Code), used as a research tool by a human researcher. Every receipt was human-verified against mozilla-central source at 446c6e60 (file:line), and the control-flow was traced end-to-end (JS + the C++ verifier's error mapping) before this report.

The original report as published on Mozilla's Bugzilla, by Gal Ankonina. 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 the client imports records into IndexedDB before verifying the signature, and its rollback is gated on a single error type (InvalidSignatureError), so any other verification failure re-throws without clearing the stored records.

Impact

An attacker who controls the Remote Settings response could inject unverified records, such as removing a OneCRL entry to un-revoke a certificate or dropping a blocklist entry, and have them served to clients until an honest sync occurs; the report acknowledges the precondition of controlling the server, CDN or TLS connection.

What the attacker needed

Control of Remote Settings response; compromised server/CDN or TLS MITM

The fix

The report proposes rolling back on any verification failure rather than only InvalidSignatureError, and structurally verifying records before importing them, plus restricting the x5u fetch to Mozilla HTTPS hosts; a patch is attached but the text does not say it was merged.

How it was found

  1. Serve a changeset from the Remote Settings endpoint containing attacker records and a signature value that is well-formed base64 but decodes to an odd number of bytes.
  2. The client imports the records into IndexedDB before verification runs.
  3. The signature verifier rejects the malformed signature with a generic failure rather than InvalidSignatureError.
  4. The error handler re-throws without clearing the database, so the attacker records remain stored.
  5. Call get() on the collection and observe the unverified attacker record is returned.

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.

Firefox downloads lists of blocked add-ons and revoked certificates from Mozilla servers, and checks a cryptographic signature so it can trust the data even if the server is compromised. This report shows the browser saved the downloaded data first and only deleted it if the signature check failed in one particular way. By making the check fail in a different way, an attacker who already controlled the download could keep their fake data in place.

What is Crypto?

Encryption, signatures, randomness or certificate checks that do not protect what they claim to.

More from Mozilla

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Cryptographic weaknesses

The lesson behind this report.

Encryption, signatures, randomness or certificate checks that do not protect what they claim to.