CVE-2022-36315
Medium · 4.3CVSS
4.3
EPSS
0.2%
Published
Dec 22, 2022
CISA due date
—
Cloudanix analysis
A problem in how the browser handles security checks on cached scripts could let someone who can already change a webpage slightly alter what runs without the check catching it.
- Exploitation
- Requires User Interaction
- Attacker needs
- User Interaction
- Complexity
- Moderate
- Impact
- Data Tampering
- Component
- Application
- Class
- Improper Input Validation
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Improper validation allows reuse of cached Subresource Integrity entries with mismatched metadata when loading scripts, bypassing intended integrity checks.
Why it matters to the business
Attackers with existing injection access could alter script behavior in affected browsers, resulting in limited tampering of web content without broader system compromise.
How an attack unfolds
An attacker with script injection capability crafts a page that loads a script using Subresource Integrity attributes, forcing the browser to reuse a prior cache entry that carries different integrity metadata and thereby evades the check.
How to fix it
Upgrade Mozilla Firefox to version 103 or later to enforce correct integrity validation against cached entries.
How to confirm the fix worked
Confirm browser version is at least 103; test SRI-protected script loads after clearing cache to verify metadata is revalidated on each load.
Typical attack path
- Identify a site allowing script injection
- Inject a script tag referencing an external resource with SRI integrity attribute
- Trigger cache reuse of a previously loaded entry with mismatched metadata
- Observe execution of the resource despite integrity mismatch
How to detect it
Examine browser cache and network logs for script loads that bypass expected integrity verification; review web server access logs for unusual script injection patterns around the affected versions.
What your security team should do
- Prioritize browser updates across all managed endpoints to Firefox 103+
- Review web applications for reliance on Subresource Integrity and ensure cache headers do not interfere with validation
- Monitor for future SRI-related updates in browser release notes
The record
When loading a script with Subresource Integrity, attackers with an injection capability could trigger the reuse of previously cached entries with incorrect, different integrity metadata. This vulnerability affects Firefox < 103.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Ubuntu:18.04:LTS | firefox | 0 | 103.0+build1-0ubuntu0.18.04.1 |
| Ubuntu:20.04:LTS | firefox | 0 | 103.0+build1-0ubuntu0.20.04.1 |
| Ubuntu:20.04:LTS | thunderbird | 0 | 1:102.2.2+build1-0ubuntu0.20.04.1 |
| Ubuntu:22.04:LTS | thunderbird | 0 | 1:102.2.2+build1-0ubuntu0.22.04.1 |
| openSUSE:Tumbleweed | MozillaFirefox | 0 | 103.0.1-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