CVE-2020-1947 Deserialization of Untrusted Data in Apache ShardingSphere

Critical 9.8 Published Updated

Attackers can achieve remote code execution by sending malicious YAML inputs to the ShardingSphere web console due to unsafe SnakeYAML deserialization.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2020-1947?

CVE-2020-1947 is a critical unsafe deserialization vulnerability in Apache ShardingSphere(incubator), published on 11 Mar 2020. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

In Apache ShardingSphere(incubator) 4.0.0-RC3 and 4.0.0, the ShardingSphere's web console uses the SnakeYAML library for parsing YAML inputs to load datasource configuration. SnakeYAML allows to unmarshal data to a Java type By using the YAML tag. Unmarshalling untrusted data can lead to security flaws of RCE.

Weakness: CWE-502

Which versions are affected by CVE-2020-1947?

2 open source packages ship an affected version, including org.apache.shardingsphere:shardingsphere. It affects 1 product.

PackageAffectedFixed in
org.apache.shardingsphere:shardingsphere MavenFrom 4.0.0-RC34.0.1
org.apache.shardingsphere:shardingsphere MavenFrom 4.0.0-RC34.0.1

Products include Apache Shardingsphere.

How do I fix CVE-2020-1947?

Upgrade org.apache.shardingsphere:shardingsphere to 4.0.1 or later.

Upgrade, and only deserialise data from trusted sources or with an allow-list of types. More about Unsafe deserialization.

Is CVE-2020-1947 being exploited?

There is no known exploitation of CVE-2020-1947 in the wild and no public exploit code.

Public exploit code: 4 proofs of concept on GitHub.

Sources

Also known as GHSA-v54f-xcmp-43cr.

Is CVE-2020-1947 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free