CVE-2021-26291 block repositories using http by default

Critical 9.1 Published Updated

Maven follows HTTP repositories defined in dependencies by default, allowing attackers to inject malicious code via compromised or spoofed repositories.

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

What is CVE-2021-26291?

CVE-2021-26291 is a critical vulnerability in Oracle Financial Services Analytical Applications Infrastructure, published on 23 Apr 2021. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

Apache Maven will follow repositories that are defined in a dependency’s Project Object Model (pom) which may be surprising to some users, resulting in potential risk if a malicious actor takes over that repository or is able to insert themselves into a position to pretend to be that repository. Maven is changing the default behavior in 3.8.1+ to no longer follow http (non-SSL) repository references by default. More details available in the referenced urls. If you are currently using a repository manager to govern the repositories used by your builds, you are unaffected by the risks present in the legacy behavior, and are unaffected by this vulnerability and change to default behavior. See this link for more information about repository management: https://maven.apache.org/repository-management.html

Weakness: CWE-346

Which versions are affected by CVE-2021-26291?

5 open source packages ship an affected version, including org.apache.maven:maven-compat, maven and org.apache.maven:maven-core. It affects 4 products.

PackageAffectedFixed in
org.apache.maven:maven-compat MavenAll versions3.8.1
org.apache.maven:maven-compat MavenAll versions3.8.1
maven BitnamiAll versions3.8.1
org.apache.maven:maven-core MavenAll versions3.8.1
org.apache.maven:maven-core MavenAll versions3.8.1

Products include Apache Maven, Oracle Financial Services Analytical Applications Infrastructure, Oracle Goldengate Big Data and Application Adapters, Quarkus Quarkus.

How do I fix CVE-2021-26291?

Upgrade org.apache.maven:maven-compat to 3.8.1 or later.

Is CVE-2021-26291 being exploited?

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

Public exploit code: 1 proofs of concept on GitHub.

All Oracle Financial Services Analytical Applications Infrastructure vulnerabilities

Sources

Also known as BIT-maven-2021-26291, CLSA-2026-1786433114, DEBIAN-CVE-2021-26291, GHSA-2f88-5hg8-9x2x, MGASA-2023-0230, OESA-2021-1276 and 3 more.

Is CVE-2021-26291 in your software?

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

Check your SBOMs for free