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.
Mitigation: Existing web.xml configuration parameters can be used to direct MyFaces to use SecureRandom for CSRF token generation:
org.apache.myfaces.RANDOMKEYINVIEWSTATESESSIONTOKEN=secureRandom org.apache.myfaces.RANDOMKEYINCSRFSESSIONTOKEN=secureRandom org.apache.myfaces.RANDOMKEYINWEBSOCKETSESSIONTOKEN=secureRandom
{ "nvd_published_at": "2021-02-19T09:15:00Z", "cwe_ids": [ "CWE-330", "CWE-352" ], "severity": "HIGH", "github_reviewed": true, "github_reviewed_at": "2021-05-07T21:12:38Z" }