CWE-487

Reliance on Package-level Scope

Medium

Description

Java packages are not inherently closed; therefore, relying on them for code security is not a good practice.

Potential Impact

How to Fix

Architecture and Design

Data should be private static and final whenever possible. This will assure that your code is protected by instantiating early, preventing access and tampering.

Detection Methods

Related Weaknesses

References

View on MITRE CWE Database →

Need Help Fixing This Vulnerability?

Our security experts can help you identify and remediate CWE-487 vulnerabilities in your codebase.

Get Security Assessment