CVE-2022-40958
NixOS vulnerability analysis and mitigation

Overview

CVE-2022-40958 is a security vulnerability discovered in Mozilla Firefox and related products that affects cookie handling mechanisms. The vulnerability was discovered by Axel Chong (@Haxatron) and disclosed in September 2022. It affects Firefox versions prior to 105.0, Firefox ESR versions before 102.3, and Thunderbird versions before 102.3 (Mozilla Advisory).

Technical details

The vulnerability allows bypassing Secure Context restrictions for cookies with __Host and __Secure prefixes. By injecting a cookie with certain special characters, an attacker on a shared subdomain which is not a secure context could set and thus overwrite cookies from a secure context. The vulnerability has been assigned a CVSS v3.1 base score of 6.5 (Medium) with vector CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N (NVD).

Impact

The vulnerability could lead to session fixation and other attacks, potentially allowing attackers to bypass security restrictions meant to protect cookie prefixes. This could enable an attacker to overwrite cookies from a secure context, compromising the security model of cookie prefixes designed to prevent such manipulations (Mozilla Advisory).

Exploitability

The vulnerability can be exploited by an attacker on a shared subdomain that is not a secure context. The attack involves injecting specially crafted cookies with specific characters to bypass security restrictions. The vulnerability was confirmed to be exploitable through both document.cookie manipulation and Set-Cookie headers (Mozilla Bug).

Mitigation and workarounds

The vulnerability was fixed in Firefox 105.0, Firefox ESR 102.3, and Thunderbird 102.3. The fix involves rejecting cookies with no name and a __Secure- or __Host- prefix, preventing the bypass of secure context restrictions. Users should upgrade to these versions or newer to mitigate the vulnerability (Mozilla Advisory).

Additional resources


SourceThis report was generated using AI

Related NixOS vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-75874CRITICAL10
  • NixOS logoNixOS
  • cpe:2.3:a:mozilla:firefox
NoYesAug 18, 2026
CVE-2026-74990CRITICAL9.8
  • NixOS logoNixOS
  • firefox-esr
NoYesAug 18, 2026
CVE-2026-74989CRITICAL9.8
  • NixOS logoNixOS
  • MozillaFirefox-translations-common
NoYesAug 18, 2026
CVE-2026-74988CRITICAL9.8
  • NixOS logoNixOS
  • cpe:2.3:a:mozilla:firefox
NoYesAug 18, 2026
CVE-2026-74987CRITICAL9.8
  • NixOS logoNixOS
  • firefox-esr
NoYesAug 18, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management