CVE-2023-25736
Critical · 9.8CVSS
9.8
EPSS
0.7%
Published
Jun 19, 2023
CISA due date
—
Cloudanix analysis
Older versions of Firefox contain a flaw that lets attackers who trick someone into visiting a malicious website potentially take full control of that person's computer.
- Exploitation
- Remote Unauthenticated
- Attacker needs
- None
- Complexity
- Low
- Impact
- Full Compromise
- Component
- Application
- Class
- Memory Corruption
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Invalid downcast from nsHTMLDocument to nsIContent triggers undefined behavior and memory corruption in the browser engine.
Why it matters to the business
Remote attackers could execute arbitrary code on user systems running vulnerable Firefox versions, leading to data theft, ransomware deployment, or full host compromise; high ecosystem prevalence of the browser increases organizational exposure.
How an attack unfolds
An attacker hosts a malicious web page that, when rendered by a vulnerable Firefox instance, triggers the invalid downcast during document handling; the resulting memory corruption is then leveraged for code execution without user interaction beyond visiting the page.
How to fix it
Upgrade Mozilla Firefox to version 110 or later on all endpoints; enable automatic updates where possible and verify installation via about:support.
How to confirm the fix worked
Confirm Firefox version is 110 or higher; attempt reproduction with a minimal test case that exercises nsHTMLDocument casting if available in a lab; review update logs for successful deployment across the fleet.
Typical attack path
- Attacker crafts and hosts a malicious HTML/JS payload targeting the downcast flaw.
- Victim using Firefox < 110 loads the page via browser navigation or embedded content.
- Rendering engine performs the invalid cast, causing memory corruption.
- Attacker chain uses the corruption to achieve arbitrary code execution within the browser process.
How to detect it
Review Firefox crash logs and telemetry for anomalies during page rendering; correlate web proxy or endpoint logs showing visits to newly registered or suspicious domains around the time of any browser instability.
What your security team should do
- Immediately deploy Firefox 110+ via enterprise management tools to all affected systems.
- Block or isolate legacy browser instances that cannot be updated.
- Monitor browser crash reports and process integrity for signs of exploitation attempts.
- Educate users on avoiding untrusted sites until patches are applied.
The record
An invalid downcast from `nsHTMLDocument` to `nsIContent` could have lead to undefined behavior. This vulnerability affects Firefox < 110.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Ubuntu:18.04:LTS | firefox | 0 | 110.0+build3-0ubuntu0.18.04.1 |
| Ubuntu:18.04:LTS | mozjs38 | 0 | No fix |
| Ubuntu:18.04:LTS | mozjs52 | 0 | No fix |
| Ubuntu:20.04:LTS | firefox | 0 | 110.0+build3-0ubuntu0.20.04.1 |
| Ubuntu:20.04:LTS | mozjs52 | 0 | No fix |
| Ubuntu:20.04:LTS | mozjs68 | 0 | No fix |
| Ubuntu:22.04:LTS | mozjs78 | 0 | No fix |
| Ubuntu:22.04:LTS | mozjs91 | 0 | No fix |
| Ubuntu:Pro:18.04:LTS | mozjs38 | 0 | No fix |
| Ubuntu:Pro:18.04:LTS | mozjs52 | 0 | No fix |
| Ubuntu:Pro:20.04:LTS | mozjs52 | 0 | No fix |
| Ubuntu:Pro:20.04:LTS | mozjs68 | 0 | No fix |
| Ubuntu:Pro:22.04:LTS | mozjs78 | 0 | No fix |
| openSUSE:Tumbleweed | MozillaFirefox | 0 | 110.0.1-1.1 |
| openSUSE:Tumbleweed | firefox-esr | 0 | 128.5.1-1.1 |
Related vulnerabilities
- 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
- CVE-2023-32205 In multiple cases browser prompts could have been obscured by popups controlled by… Also affects firefox