CWE-766

Critical Data Element Declared Public

Medium

Description

The product declares a critical variable, field, or member to be public when intended security policy requires it to be private.

Potential Impact

How to Fix

Implementation

Data should be private, static, and final whenever possible. This will assure that your code is protected by instantiating early, preventing access, and preventing 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-766 vulnerabilities in your codebase.

Get Security Assessment