J2EE Misconfiguration: Weak Access Permissions for EJB Methods

Draft Variant
Structure: Simple
Description

This vulnerability occurs when Enterprise JavaBean (EJB) methods are configured with overly permissive access rights, allowing attackers to exploit elevated privileges they should not have.

Extended Description

A primary indicator of this misconfiguration is the use of the special 'ANYONE' role in the EJB deployment descriptor. Granting this role to methods suggests either incomplete security planning or an application architecture that makes proper access control difficult to implement. This creates a significant risk because it bypasses standard role-based authorization. Attackers can directly invoke sensitive business logic or access data without proper authentication, potentially leading to data breaches, privilege escalation, or unauthorized transactions within the application.

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