CVE-2010-2057: Medium severity apache myfaces vulnerability

Published Jun 10, 2010
·
Updated

Quoting the upstream bug report [1]:

Both myfaces and mojarra only encrypt the state. What is missing is add a message authentication code (MAC) to the encryption to prevent padding oracle attack. The objective is detect if the received view state has been modified and do not process it, throwing ViewExpiredException.

The problem can be solved if users change to server side state saving, because on the view state only a identifier is sent and no changes on the component tree could be done with this configuration.

The proposed solution was add this new web-config params:

org.apache.myfaces.MACALGORITHM : Indicate the algorithm used to calculate the Message Authentication Code that is added to the view state.

org.apache.myfaces.MACSECRET : Define the initialization code that are used to initialize the secret key used on the Message Authentication Code algorithm.

org.apache.myfaces.MACSECRET.CACHE : If is set to "false", the secret key used for MAC algorithm is not cached. This is used when the returned SecretKey for mac algorithm is not thread safe.

It was unified security configuration in all branches to works the same. That means, it was included in 1.1.x the property org.apache.myfaces.USEENCRYPTION.

Now, if an error occur when the state is encrypted/decrypted, a ViewExpiredException is thrown, but the real exception is logged, to hide information that could be useful to non developers.

This was corrected upstream in versions 1.1.8, 1.2.9, and 2.0.1. It has also been assigned the name CVE-2010-2057.

[1] https://issues.apache.org/jira/browse/MYFACES-2749

I believe the following is the commit that corrects this flaw, but will need to be verified:

http://svn.apache.org/viewvc/myfaces/shared/trunk/core/src/main/java/org/apache/myfaces/shared/util/StateUtils.java?r1=943327&r2=951801

Other sources

shared/util/StateUtils.java in Apache MyFaces 1.1.x before 1.1.8, 1.2.x before 1.2.9, and 2.0.x before 2.0.1 uses an encrypted View State without a Message Authentication Code (MAC), which makes it easier for remote attackers to perform successful modifications of the View State via a padding oracle attack.

Affected Software

22 affected componentsFixes available
Apache MyFaces=1.1.1
Apache MyFaces=1.1.6
Apache MyFaces=1.1.3
Apache MyFaces=1.1.5
Apache MyFaces=1.1.0
Apache MyFaces=1.1.7
Apache MyFaces=1.1.4
Apache MyFaces=1.1.2
Apache MyFaces=1.2.5
Apache MyFaces=1.2.3
Apache MyFaces=1.2.2
Apache MyFaces=1.2.6
Apache MyFaces=1.2.8
Apache MyFaces=1.2.7
Apache MyFaces=1.2.4
Apache MyFaces=2.0.0
maven/org.apache.myfaces.core:myfaces-impl>=2.0.0<2.0.1
2.0.1
maven/org.apache.myfaces.core:myfaces-impl>=1.2.0<1.2.9
1.2.9
maven/org.apache.myfaces.core:myfaces-impl>=1.1.0<1.1.8
1.1.8
maven/org.apache.myfaces.shared:myfaces-shared-core>=2.0.0<2.0.1
2.0.1
maven/org.apache.myfaces.shared:myfaces-shared-core>=1.2.0<1.2.9
1.2.9
maven/org.apache.myfaces.shared:myfaces-shared-core>=1.1.0<1.1.8
1.1.8

Event History

Jun 10, 2010
CVE Published
12:00 AM
Data Sourced
12:00 AM
RemedyDescriptionSeverity
Aug 12, 2010
Data Sourced
via Red Hat·07:28 PM
DescriptionSeverityAffected Software
Oct 20, 2010
CVE Published
via MITRE·05:00 PM
Data Sourced
via MITRE·05:00 PM
Description
May 17, 2022
Advisory Published
05:45 AM

Frequently Asked Questions

1

What is the severity of CVE-2010-2057?

CVE-2010-2057 is classified as a high severity vulnerability due to the risk of padding oracle attacks.

2

How do I fix CVE-2010-2057?

To fix CVE-2010-2057, upgrade to Apache MyFaces version 1.1.8 or later, or to version 2.0.1 or later.

3

What software is affected by CVE-2010-2057?

CVE-2010-2057 affects Apache MyFaces versions 1.1.0 through 1.1.7 and 1.2.0 through 1.2.8.

4

What is a padding oracle attack in relation to CVE-2010-2057?

In the context of CVE-2010-2057, a padding oracle attack exploits the lack of a message authentication code in encrypted view state to manipulate the application.

5

Can CVE-2010-2057 impact my application's security?

Yes, CVE-2010-2057 can significantly impact application security by allowing attackers to alter view state data without detection.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203