J2EE Misconfiguration: Weak Access Permissions for EJB Methods

Draft Variant
Structure: Simple
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.

Common Consequences 1
Scope: Other

Impact: Other

Potential Mitigations 1
Phase: Architecture and DesignSystem 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 1
The following deployment descriptor grants ANYONE permission to invoke the Employee EJB's method named getSalary().

Code Example:

Bad
XML
xml
References 1
Seven Pernicious Kingdoms: A Taxonomy of Software Security Errors
Katrina Tsipenyuk, Brian Chess, and Gary McGraw
NIST Workshop on Software Security Assurance Tools Techniques and MetricsNIST
07-11-2005
ID: REF-6
Modes of Introduction
Architecture and Design
Implementation
Related Weaknesses
Taxonomy Mapping
  • 7 Pernicious Kingdoms