CVE-2021-26296Cross-Site Request Forgery (CSRF) vulnerability in Apache MyFaces
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.
What to do
Fixed builds are available from Maven: see the table below for the fixed version per release.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Maven library | org.apache.myfaces.core:myfaces-core-module | Fixed | 2.3.8 | GHSA-gq67-pp9w-43gp |
What the vendor says
As published in the CVE record by apache, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
- Apache Software Foundation Apache MyFaces Core: affected: Apache MyFaces Core 2.2 to before 2.2.14, Apache MyFaces Core 2.3 to before 2.3.8, Apache MyFaces Core 2.3-next to before 2.3-next-M5, Apache MyFaces Core 3.0 to before 3.0.0; fixed in
2.2.14,2.3.8,2.3-next-M5,3.0.0
Workaround: Existing web.xml configuration parameters can be used to direct MyFaces to use SecureRandom for CSRF token generation: org.apache.myfaces.RANDOM_KEY_IN_VIEW_STATE_SESSION_TOKEN=secureRandom org.apache.myfaces.RANDOM_KEY_IN_CSRF_SESSION_TOKEN=secureRandom org.apache.myfaces.RANDOM_KEY_IN_WEBSOCKET_SESSION_TOKEN=secureRandom
References
- https://lists.apache.org/thread.html/r2b73e2356c6155e9ec78fdd8f72a4fac12f3e588014f5f535106ed9b%40%3Cannounce.apache.org%3E
- http://seclists.org/fulldisclosure/2021/Feb/66
- http://packetstormsecurity.com/files/161484/Apache-MyFaces-2.x-Cross-Site-Request-Forgery.html
- https://security.netapp.com/advisory/ntap-20210528-0007/
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.