CVE-2022-0866: Medium severity jboss enterprise application platform vulnerability

Published Mar 4, 2022
·
Updated

A flaw was found in Wildfly, where it returns an incorrect caller principal under certain heavily concurrent situations when Elytron Security is used. This flaw allows an attacker to gain improper access to information they should not have.

Other sources

This is a concurrency issue that can result in the wrong caller principal being returned from the session context of an EJB that is configured with a RunAs principal. In particular, the org.jboss.as.ejb3.component.EJBComponent class has an incomingRunAsIdentity field. This field is used by the org.jboss.as.ejb3.security.RunAsPrincipalInterceptor to keep track of the current identity prior to switching to a new identity created using the RunAs principal. The exploit consist that the EJBComponent#incomingRunAsIdentity field is currently just a SecurityIdentity. This means that in a concurrent environment, where multiple users are repeatedly invoking an EJB that is configured with a RunAs principal, it's possible for the wrong the caller principal to be returned from EJBComponent#getCallerPrincipal. Similarly, it's also possible for EJBComponent#isCallerInRole to return the wrong value. Both of these methods rely on incomingRunAsIdentity.

Red Hat

This is a concurrency issue that can result in the wrong caller principal being returned from the session context of an EJB that is configured with a RunAs principal. In particular, the org.jboss.as.ejb3.component.EJBComponent class has an incomingRunAsIdentity field. This field is used by the org.jboss.as.ejb3.security.RunAsPrincipalInterceptor to keep track of the current identity prior to switching to a new identity created using the RunAs principal. The exploit consist that the EJBComponent#incomingRunAsIdentity field is currently just a SecurityIdentity. This means in a concurrent environment, where multiple users are repeatedly invoking an EJB that is configured with a RunAs principal, it's possible for the wrong the caller principal to be returned from EJBComponent#getCallerPrincipal. Similarly, it's also possible for EJBComponent#isCallerInRole to return the wrong value. Both of these methods rely on incomingRunAsIdentity. Affects all versions of JBoss EAP from 7.1.0 and all versions of WildFly 11+ when Elytron is enabled.

Affected Software

16 affected componentsFixes available
redhat/eap7-wildfly<0:7.4.5-3.GA_redhat_00001.1.el8ea
0:7.4.5-3.GA_redhat_00001.1.el8ea
redhat/eap7-wildfly<0:7.4.5-3.GA_redhat_00001.1.el7ea
0:7.4.5-3.GA_redhat_00001.1.el7ea
redhat/rh-sso7-keycloak<0:15.0.8-1.redhat_00001.1.el7
0:15.0.8-1.redhat_00001.1.el7
redhat/rh-sso7-keycloak<0:15.0.8-1.redhat_00001.1.el8
0:15.0.8-1.redhat_00001.1.el8
redhat/rh-sso7-keycloak<0:18.0.3-1.redhat_00001.1.el7
0:18.0.3-1.redhat_00001.1.el7
redhat/rh-sso7-keycloak<0:18.0.3-1.redhat_00001.1.el8
0:18.0.3-1.redhat_00001.1.el8
redhat/rh-sso7<0:1-5.el9
0:1-5.el9
redhat/rh-sso7-javapackages-tools<0:6.0.0-7.el9
0:6.0.0-7.el9
redhat/rh-sso7-keycloak<0:18.0.3-1.redhat_00001.1.el9
0:18.0.3-1.redhat_00001.1.el9
redhat JBoss Enterprise Application Platform>=7.1.0
redhat Openstack Platform=13.0
redhat Wildfly>=11.0.0
redhat/wildfly<26.1.1.
26.1.1.
redhat/wildfly<27.0.0.
27.0.0.
redhat Wildfly>=11.0.0<26.1.1
redhat Wildfly=27.0.0-alpha1

Remediation

Information

In order to avoid the possibility of information access, review application source code for '@RunAs' and 'run-as-principal' usage. Also, make sure the application is using or not Elytron Security. It's possible to investigate by checking if the commands from '$JBOSS_HOME/docs/examples/enable-elytron.cli' or similar were executed.

Event History

Mar 4, 2022
Data Sourced
via Red Hat·03:30 PM
DescriptionSeverityAffected Software
May 3, 2022
CVE Published
12:00 AM
May 10, 2022
CVE Published
via MITRE·08:20 PM
Data Sourced
via MITRE·08:20 PM
DescriptionWeakness
Data Sourced
via NVD·09:15 PM
DescriptionSeverityWeaknessAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is CVE-2022-0866?

CVE-2022-0866 is a vulnerability in Wildfly that can result in an incorrect caller principal being returned from the session context of an EJB.

2

What is the severity of CVE-2022-0866?

CVE-2022-0866 has a severity rating of medium (3.1).

3

Which software versions are affected by CVE-2022-0866?

CVE-2022-0866 affects versions 7.4.5-3.GA_redhat_00001.1.el8ea and 7.4.5-3.GA_redhat_00001.1.el7ea of eap7-wildfly, and versions 15.0.8-1.redhat_00001.1.el7 and 15.0.8-1.redhat_00001.1.el8 of rh-sso7-keycloak.

4

How can I fix CVE-2022-0866?

To fix CVE-2022-0866, update your eap7-wildfly package to version 7.4.5-3.GA_redhat_00001.1.el8ea or 7.4.5-3.GA_redhat_00001.1.el7ea, or update your rh-sso7-keycloak package to version 15.0.8-1.redhat_00001.1.el7 or 15.0.8-1.redhat_00001.1.el8.

5

Where can I find more information about CVE-2022-0866?

You can find more information about CVE-2022-0866 on the Red Hat Security Advisory pages: [RHSA-2022:4922](https://access.redhat.com/errata/RHSA-2022:4922), [RHSA-2022:4918](https://access.redhat.com/errata/RHSA-2022:4918), [RHSA-2022:4919](https://access.redhat.com/errata/RHSA-2022:4919).

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
CVE-2022-0866 - Medium severity jboss enterprise application platform vulnerability - SecAlerts