CVE-2020-5529 Code execution vulnerability in HtmlUnit

High 8.1 Published Updated

Improper initialization of the Rhino engine in HtmlUnit allows malicious JavaScript to execute arbitrary Java code, posing a risk to applications using this library.

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-5529?

CVE-2020-5529 is a high-severity code injection vulnerability in Apache Camel, published on 11 Feb 2020. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

HtmlUnit prior to 2.37.0 contains code execution vulnerabilities. HtmlUnit initializes Rhino engine improperly, hence a malicious JavScript code can execute arbitrary Java code on the application. Moreover, when embedded in Android application, Android-specific initialization of Rhino engine is done in an improper way, hence a malicious JavaScript code can execute arbitrary Java code on the application.

Weakness: CWE-665, CWE-94

Which versions are affected by CVE-2020-5529?

2 open source packages ship an affected version, including net.sourceforge.htmlunit:htmlunit. It affects 4 products.

PackageAffectedFixed in
net.sourceforge.htmlunit:htmlunit MavenAll versions2.37.0
net.sourceforge.htmlunit:htmlunit MavenAll versions2.37.0

Products include Apache Camel, Canonical Ubuntu Linux, Debian Debian Linux, Htmlunit Htmlunit.

How do I fix CVE-2020-5529?

Upgrade net.sourceforge.htmlunit:htmlunit to 2.37.0 or later.

Upgrade, and never evaluate templates, expressions or code built from user input. More about Code injection.

Is CVE-2020-5529 being exploited?

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

All Apache Camel vulnerabilities

Sources

Also known as DLA-2326-1, GHSA-5mh9-r3rr-9597, MGASA-2021-0148, UBUNTU-CVE-2020-5529, USN-4584-1.

Is CVE-2020-5529 in your software?

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

Check your SBOMs for free