8
CWE-9: J2EE Misconfiguration: Weak Access Permissions for EJB Methods
Weakness ID : 9
Structure : Simple
Abstraction : Variant
Description
If elevated access rights are assigned to EJB methods, then an attacker can take advantage of the
permissions to exploit the product.
Extended Description
If the EJB deployment descriptor contains one or more method permissions that grant access to
the special ANYONE role, it indicates that access control for the application has not been fully
thought through or that the application is structured in such a way that reasonable access control
restrictions are impossible.
Relationships
The table(s) below shows the weaknesses and high level categories that are related to this
weakness. These relationships are defined as ChildOf, ParentOf, MemberOr and give insight to
similar items that may exist at higher and lower levels of abstraction. In addition, relationships such
as PeerOf and CanAlsoBe are defined to show similar weaknesses that may want to be explored.
Relevant to the view "Research Concepts" (CWE-1000)
Nature Type ID Name Page
ChildOf 266 Incorrect Privilege Assignment 638
Common Consequences
Scope Impact Likelihood
Other Other
Potential Mitigations
Phase: Architecture and Design
Phase: System Configuration
Follow the principle of least privilege when assigning access rights to EJB methods. Permission
to invoke EJB methods should not be granted to the ANYONE role.
Demonstrative Examples
Example 1:
The following deployment descriptor grants ANYONE permission to invoke the Employee EJB's
method named getSalary().
Example Language: XML (Bad)
<ejb-jar>
...
<assembly-descriptor>
<method-permission>
<role-name>ANYONE</role-name>
<method>
<ejb-name>Employee</ejb-name>
<method-name>getSalary</method-name>
</method-permission>
</assembly-descriptor>
...
</ejb-jar>
MemberOf Relationships
CWE Version 4.14
CWE-11: ASP.NET Misconfiguration: Creating Debug Binary
CWE-11: ASP.NET Misconfiguration: Creating Debug Binary