CVE-2023-28754 ShardingSphere-Agent: Deserialization vulnerability in ShardingSphere Agent
Attackers with file write access can execute arbitrary code via malicious YAML deserialization in ShardingSphere Agent.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2023-28754?
CVE-2023-28754 is a high-severity unsafe deserialization vulnerability in Apache Software Foundation ShardingSphere-Agent, published on 19 Jul 2023. Any signed-in user can exploit it over the network, with no action from the victim.
Official description
Deserialization of Untrusted Data vulnerability in Apache ShardingSphere-Agent, which allows attackers to execute arbitrary code by constructing a special YAML configuration file.
The attacker needs to have permission to modify the ShardingSphere Agent YAML configuration file on the target machine, and the target machine can access the URL with the arbitrary code JAR. An attacker can use SnakeYAML to deserialize java.net.URLClassLoader and make it load a JAR from a specified URL, and then deserialize javax.script.ScriptEngineManager to load code using that ClassLoader. When the ShardingSphere JVM process starts and uses the ShardingSphere-Agent, the arbitrary code specified by the attacker will be executed during the deserialization of the YAML configuration file by the Agent.
This issue affects ShardingSphere-Agent: through 5.3.2. This vulnerability is fixed in Apache ShardingSphere 5.4.0.
Weakness: CWE-502
Which versions are affected by CVE-2023-28754?
2 open source packages ship an affected version, including org.apache.shardingsphere:shardingsphere. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
org.apache.shardingsphere:shardingsphere Maven | All versions | 5.4.0 |
org.apache.shardingsphere:shardingsphere Maven | All versions | 5.4.0 |
Products include Apache Shardingsphere.
How do I fix CVE-2023-28754?
Upgrade org.apache.shardingsphere:shardingsphere to 5.4.0 or later.
Upgrade, and only deserialise data from trusted sources or with an allow-list of types. More about Unsafe deserialization.
Is CVE-2023-28754 being exploited?
There is no known exploitation of CVE-2023-28754 in the wild and no public exploit code.
Other vulnerabilities in Apache Software Foundation ShardingSphere-Agent
Sources
Also known as GHSA-3cxh-xp3g-jxjm.