CVE-2022-22757
Medium · 6.5CVSS
6.5
EPSS
0.2%
Published
Dec 22, 2022
CISA due date
—
Cloudanix analysis
A testing feature in the browser could let a malicious website take control if that feature is turned on, but it is off by default so most people are unaffected.
- Exploitation
- Requires User Interaction
- Attacker needs
- User Interaction
- Complexity
- High
- Impact
- Data Tampering
- Component
- Application
- Class
- Authorization Bypass
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
The Remote Agent component used by WebDriver fails to validate Host or Origin headers on incoming connections, permitting unauthorized cross-origin requests from websites to localhost that can seize control of the browser instance.
Why it matters to the business
When WebDriver is explicitly enabled, organizations risk limited browser session takeover from malicious sites, which could expose user actions or data; however the non-default configuration and low exploit probability keep overall operational exposure minimal.
How an attack unfolds
An attacker hosts a webpage that, when loaded in a Firefox instance running WebDriver, issues a connection to the local Remote Agent endpoint; because header validation is absent the agent accepts the request and grants the attacker the ability to drive browser actions.
How to fix it
Upgrade Mozilla Firefox to version 97 or later; disable the Remote Agent / WebDriver feature when it is not required for testing or automation.
How to confirm the fix worked
Confirm the installed Firefox version is 97 or newer; attempt to connect to the Remote Agent from an external origin and verify that requests lacking valid Host or Origin headers are rejected.
Typical attack path
- User has Firefox with WebDriver enabled and visits attacker-controlled site
- Malicious page issues HTTP request to localhost Remote Agent endpoint
- Missing Host/Origin checks allow the connection to succeed
- Attacker issues WebDriver commands to control the browser session
How to detect it
Inspect browser process logs and network activity for unexpected localhost connections initiated by web content; look for WebDriver command traffic originating from non-local sources.
What your security team should do
- Disable WebDriver / Remote Agent unless explicitly needed
- Upgrade all Firefox installations to 97 or later
- Include browser version checks in endpoint compliance scans
The record
Remote Agent, used in WebDriver, did not validate the Host or Origin headers. This could have allowed websites to connect back locally to the user's browser to control it. <br>*This bug only affected Firefox when WebDriver was enabled, which is not the default configuration.*. This vulnerability affects Firefox < 97.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Ubuntu:18.04:LTS | firefox | 0 | 97.0+build2-0ubuntu0.18.04.1 |
| Ubuntu:20.04:LTS | firefox | 0 | 97.0+build2-0ubuntu0.20.04.1 |
| Ubuntu:22.04:LTS | firefox | 0 | 97.0+build2-0ubuntu1 |
| openSUSE:Tumbleweed | MozillaFirefox | 0 | 97.0-1.1 |
| openSUSE:Tumbleweed | firefox-esr | 0 | 128.5.1-1.1 |
Related vulnerabilities
- CVE-2023-25736 An invalid downcast from `nsHTMLDocument` to `nsIContent` could have lead to undefined… Also affects firefox
- CVE-2023-25733 The return value from `gfx::SourceSurfaceSkia::Map()` wasn't being verified which could… Also affects firefox
- CVE-2023-32210 Documents were incorrectly assuming an ordering of principal objects when ensuring we… Also affects firefox
- CVE-2023-32216 Memory safety bugs present in Firefox 112. Also affects firefox
- CVE-2023-32209 A maliciously crafted favicon could have led to an out of memory crash. Also affects firefox
- CVE-2023-32208 Service workers could reveal script base URL due to dynamic `import()`. Also affects firefox
- CVE-2023-29551 Memory safety bugs present in Firefox 111. Also affects firefox
- CVE-2023-32207 A missing delay in popup notifications could have made it possible for an attacker to… Also affects firefox