CVE-2022-45064 Apache Sling Engine: Include-based XSS
An attacker can perform include-based XSS to escalate privileges to administrative power in Apache Sling Engine.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Over the internet
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is CVE-2022-45064?
CVE-2022-45064 is a high-severity cross-site scripting vulnerability in Apache Sling Engine, published on 13 Apr 2023. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.
Official description
The SlingRequestDispatcher doesn't correctly implement the RequestDispatcher API resulting in a generic type of include-based cross-site scripting issues on the Apache Sling level. The vulnerability is exploitable by an attacker that is able to include a resource with specific content-type and control the include path (i.e. writing content). The impact of a successful attack is privilege escalation to administrative power.
Please update to Apache Sling Engine >= 2.14.0 and enable the "Check Content-Type overrides" configuration option.
Weakness: CWE-79
Which versions are affected by CVE-2022-45064?
2 open source packages ship an affected version, including org.apache.sling:org.apache.sling.engine. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
org.apache.sling:org.apache.sling.engine Maven | All versions | 2.14.0 |
org.apache.sling:org.apache.sling.engine Maven | All versions | 2.14.0 |
Products include Apache Apache Sling Engine.
How do I fix CVE-2022-45064?
Upgrade org.apache.sling:org.apache.sling.engine to 2.14.0 or later.
Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.
Is CVE-2022-45064 being exploited?
There is no known exploitation of CVE-2022-45064 in the wild and no public exploit code.
Sources
Also known as GHSA-mg46-f9h5-g27x.