# CVE-2021-26296: Cross-Site Request Forgery (CSRF) vulnerability in Apache MyFaces

> Attackers can predict CSRF tokens in Apache MyFaces to trick users into executing unwanted actions, requiring an upgrade to secure versions.

- **Severity:** High 7.5 (`CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 19 Feb 2021
- **Updated:** 13 Feb 2025
- **Also known as:** GHSA-gq67-pp9w-43gp

## What is CVE-2021-26296?

CVE-2021-26296 is a high-severity vulnerability in Netapp Oncommand Insight, published on 19 Feb 2021. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

### Official description

In the default configuration, Apache MyFaces Core versions 2.2.0 to 2.2.13, 2.3.0 to 2.3.7, 2.3-next-M1 to 2.3-next-M4, and 3.0.0-RC1 use cryptographically weak implicit and explicit cross-site request forgery (CSRF) tokens. Due to that limitation, it is possible (although difficult) for an attacker to calculate a future CSRF token value and to use that value to trick a user into executing unwanted actions on an application.

Weakness: CWE-352 (Cross-Site Request Forgery)

## Which versions are affected by CVE-2021-26296?

8 open source packages ship an affected version, including org.apache.myfaces.core:myfaces-core-module. It affects 2 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `org.apache.myfaces.core:myfaces-core-module` | Maven | All versions | 2.0.25 |
| `org.apache.myfaces.core:myfaces-core-module` | Maven | All versions | 2.0.25 |
| `org.apache.myfaces.core:myfaces-core-module` | Maven | From 2.1.0 | 2.1.19 |
| `org.apache.myfaces.core:myfaces-core-module` | Maven | From 2.1.0 | 2.1.19 |
| `org.apache.myfaces.core:myfaces-core-module` | Maven | From 2.2.0 | 2.2.14 |
| `org.apache.myfaces.core:myfaces-core-module` | Maven | From 2.2.0 | 2.2.14 |
| `org.apache.myfaces.core:myfaces-core-module` | Maven | From 2.3.0 | 2.3.8 |
| `org.apache.myfaces.core:myfaces-core-module` | Maven | From 2.3.0 | 2.3.8 |

Products: Apache Myfaces, Netapp Oncommand Insight.

## How do I fix CVE-2021-26296?

Upgrade org.apache.myfaces.core:myfaces-core-module to a fixed version for your release line: 2.0.25, 2.1.19, 2.2.14 or 2.3.8.

## Is CVE-2021-26296 being exploited?

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

## Other vulnerabilities in Netapp Oncommand Insight

- [CVE-2011-4343](https://insights.sbomify.com/CVE-2011-4343/): Apache MyFaces Vulnerable to EL Injection (high 7.5)
- [CVE-2011-4367](https://insights.sbomify.com/CVE-2011-4367/): Apache MyFaces Vulnerable to Path Traversal (medium 5.0)
- [CVE-2010-2057](https://insights.sbomify.com/CVE-2010-2057/): Improper Authentication in Apache MyFaces (medium 5.0)
- [CVE-2010-2086](https://insights.sbomify.com/CVE-2010-2086/): Apache MyFaces Cross-site Scripting vulnerability (medium 4.0)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2021-26296 and fix it if it is affected.

What it is: CVE-2021-26296 is a high-severity vulnerability in Netapp Oncommand Insight, published on 19 Feb 2021. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of CVE-2021-26296 in the wild and no public exploit code.

Affected packages and fixed versions:
- org.apache.myfaces.core:myfaces-core-module (Maven): affected all versions; fixed in 2.0.25
- org.apache.myfaces.core:myfaces-core-module (Maven): affected all versions; fixed in 2.0.25
- org.apache.myfaces.core:myfaces-core-module (Maven): affected from 2.1.0; fixed in 2.1.19
- org.apache.myfaces.core:myfaces-core-module (Maven): affected from 2.1.0; fixed in 2.1.19
- org.apache.myfaces.core:myfaces-core-module (Maven): affected from 2.2.0; fixed in 2.2.14
- org.apache.myfaces.core:myfaces-core-module (Maven): affected from 2.2.0; fixed in 2.2.14
- org.apache.myfaces.core:myfaces-core-module (Maven): affected from 2.3.0; fixed in 2.3.8
- org.apache.myfaces.core:myfaces-core-module (Maven): affected from 2.3.0; fixed in 2.3.8

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2021-26296/ (Markdown: https://insights.sbomify.com/CVE-2021-26296/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2021-26296
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2021-26296
- OSV: https://osv.dev/vulnerability/CVE-2021-26296

---
From sbomify Insights: https://insights.sbomify.com/CVE-2021-26296/
Summaries are generated and may contain mistakes; the official description above is the record.
