CVE-2021-26291 is a critical-severity (CVSS 9.1) CWE-346 vulnerability in org.apache.maven:maven-compat. 1 public exploit reference exists, so weaponization risk is real. A fix is available for org.apache.maven:maven-compat — see the affected versions and patch details below.
Origin Validation Error in Apache Maven
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
CVE-2021-26291 by exploitation likelihood (EPSS) against impact (CVSS). Outside the shaded patch-first corner.
Where this sits among everything scored
Of 385,987 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Counts from FIRST.org, log-scaled.
Real-World Exposure
org.apache.maven:maven-compat☕org.apache.maven:maven-coreReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Maven packages — download data is not available via public APIs for these ecosystems.
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
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| ☕Maven | org.apache.maven:maven-compat | all versions | 3.8.1org.apache.maven:maven-compat:3.8.1 |
| ☕Maven | org.apache.maven:maven-core | all versions | 3.8.1org.apache.maven:maven-core:3.8.1 |
Affected Products
mavenapachefinancial services analytical applications infrastructureoraclegoldengate big data and application adaptersoraclequarkusquarkusResearch use only. For defensive security, authorized penetration testing, and academic research only. Never execute exploit code against systems without explicit written authorization.
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for org.apache.maven:maven-compat, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update org.apache.maven:maven-compat to 3.8.1 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2021-26291 is resolved across your whole dependency graph.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
Fixing This On Your OS
If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.
To avoid possible man-in-the-middle related attacks with this flaw, ensure any linked repositories in maven POMs use https and not http.Source: Red Hat security advisory for CVE-2021-26291 (CC BY 4.0)
| Product | Fixed in | Advisory |
|---|---|---|
| OCP-Tools-4.12-RHEL-8 | jenkins-2-plugins-0:4.12.1706515741-1.el8 | RHSA-2024:0778 |
| OCP-Tools-4.13-RHEL-8 | jenkins-2-plugins-0:4.13.1706516346-1.el8 | RHSA-2024:0776 |
| OpenShift Developer Tools and Services for OCP 4.11 | jenkins-2-plugins-0:4.11.1683009941-1.el8 | RHSA-2023:3198 |
| Red Hat build of Quarkus 2.2.3 | maven-wrapper | RHSA-2021:3880 |
| RHINT Camel-K 1.6.4 | maven-core | RHSA-2022:1029 |
| RHINT Camel-Q 2.2.1 | see advisory | RHSA-2022:1013 |
| RHPAM 7.13.1 async | rhpam-7-businesscentral-rhel8-container | RHSA-2023:1334 |
Frequently Asked Questions
Is CVE-2021-26291 in your dependencies?
Find it across Maven, including transitive dependencies.