7
Potential Mitigations
Phase: Implementation
Declare Java beans "local" when possible. When a bean must be remotely accessible, make
sure that sensitive information is not exposed, and ensure that the application logic performs
appropriate validation of any data that might be modified by an attacker.
Demonstrative Examples
Example 1:
The following example demonstrates the weakness.
Example Language: XML (Bad)
<ejb-jar>
<enterprise-beans>
<entity>
<ejb-name>EmployeeRecord</ejb-name>
<home>com.wombat.empl.EmployeeRecordHome</home>
<remote>com.wombat.empl.EmployeeRecord</remote>
...
</entity>
...
</enterprise-beans>
</ejb-jar>
MemberOf Relationships
This MemberOf relationships table shows additional CWE Catgeories and Views that reference this
weakness as a member. This information is often useful in understanding where a weakness fits
within the context of external information sources.
Nature Type ID Name Page
MemberOf 2 7PK - Environment 700 2308
MemberOf 731 OWASP Top Ten 2004 Category A10 - Insecure
Configuration Management
711 2339
MemberOf 963 SFP Secondary Cluster: Exposed Data 888 2400
MemberOf 1403 Comprehensive Categorization: Exposed Resource 1400 2528
Notes
Other
Entity beans that expose a remote interface become part of an application's attack surface. For
performance reasons, an application should rarely use remote entity beans, so there is a good
chance that a remote entity bean declaration is an error.
Taxonomy Mappings
Mapped Taxonomy Name Node ID Fit Mapped Node Name
7 Pernicious Kingdoms J2EE Misconfiguration: Unsafe Bean
Declaration
Software Fault Patterns SFP23 Exposed Data
References
[REF-6]Katrina Tsipenyuk, Brian Chess and Gary McGraw. "Seven Pernicious Kingdoms: A
Taxonomy of Software Security Errors". NIST Workshop on Software Security Assurance Tools
Techniques and Metrics. 2005 November 7. NIST. < https://samate.nist.gov/SSATTM_Content/
papers/Seven%20Pernicious%20Kingdoms%20-%20Taxonomy%20of%20Sw%20Security
%20Errors%20-%20Tsipenyuk%20-%20Chess%20-%20McGraw.pdf >.
CWE Version 4.14
CWE-9: J2EE Misconfiguration: Weak Access Permissions for EJB Methods
CWE-9: J2EE Misconfiguration: Weak Access Permissions for EJB Methods