Firefox · DOM
CVE-2026-109759
Logic Error in DOM
Overview
Moderate
Severity
—
CVSS
No
Exploited ITW
Fixed
Fix Status
Files Changed
dom/fetch/FetchParent.cppdom/fetch/InternalRequest.h
Patch
diff --git a/dom/fetch/FetchParent.cpp b/dom/fetch/FetchParent.cpp
index a36b784e278..5274d6ca9f8 100644
--- a/dom/fetch/FetchParent.cpp
+++ b/dom/fetch/FetchParent.cpp
@@ -136,6 +136,13 @@ IPCResult FetchParent::RecvFetchOp(FetchOpArgs&& aArgs) {
"RecvFetchOp FORCE_ALLOWED_DTD not allowed from content");
}
+ if (contentHandle && InternalRequest::IsNavigationContentPolicy(
+ aArgs.request().contentPolicyType())) {
+ return IPC_FAIL(this,
+ "RecvFetchOp navigation content policy type not allowed "
+ "from content");
+ }
+
mRequest = MakeSafeRefPtr<InternalRequest>(std::move(aArgs.request()));
mIsWorkerFetch = aArgs.isWorkerRequest();
mPrincipalInfo = std::move(aArgs.principalInfo());
diff --git a/dom/fetch/InternalRequest.h b/dom/fetch/InternalRequest.h
index 1d0891f77e2..34369d1835e 100644
--- a/dom/fetch/InternalRequest.h
+++ b/dom/fetch/InternalRequest.h
@@ -450,9 +450,11 @@ class InternalRequest final : public AtomicSafeRefCounted<InternalRequest> {
static RequestDestination MapContentPolicyTypeToRequestDestination(
ExtContentPolicyType aContentPolicyType);
- private:
+ // True for content policy types that are only ever legitimately used for
+ // nsDocShell-initiated navigations, never for a fetch() call.
static bool IsNavigationContentPolicy(nsContentPolicyType aContentPolicyType);
+ private:
static bool IsWorkerContentPolicy(nsContentPolicyType aContentPolicyType);
// It should only be called while there is a service-worker-internal-redirect.
Loading diff…
References
On This Page